Skip to main content
Hi,

 

 

I am trying to read a AutoCADMap 3D .layer file which contains the following details,

 

 

<Path>

 

<Geom>M -130.0,130.0 L 130.0,130.0 L 130.0,-130.0 L -130.0,-130.0 L -130.0,130.0 M -130.0,0.0 L 130.0,0.0 M 82.425,0.0 A 82.425,82.425 0.0 1 0 -82.425,0.0 A 82.425,82.425 0.0 1 0 82.425,0.0</Geom>

 

</Path>

 

 

The Geom element has data in SVG format. I need to convert this format into Oracle SDO_GEOMETRY and store the data in Oracle spatial table.

 

 

I don't find any off-the-shelf reader/transformer. How do I perform the transformation in FME?

 

 

Regards,

 

Ananda
Hi,

 

 

I think your best bet is the PythonCaller as you'll probably have to parse the SVG geometry yourself.

 

 

Have a look at the API doc in <FME>\\fmeobjects\\python\\apidoc\\index.html to get you started.

 

 

David
The pysvg module might also be of interest.

 

 

David
I'm not clear what the contents of the geom field are - a .layer file usually contains details of feature symbology, and looking at those geometry contents they look more like a linestyle or pattern definition to me than actual features.

 

 

Still, they are XML-like so you should be able to extract the contents of the <Geom> tag using the XMLFlattener transformer. Then you could use the AttributeSplitter to divide the data up (using <space> as a delimiter>?)

 

 

Hope this is of help

 

 

Mark

 

 

Mark Ireland

 

Product Evangelist

 

Safe Software inc

Reply