Skip to main content
Question

Convert SVG path format to SDO_GEOMETRY


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

3 replies

david_r
Celebrity
  • April 24, 2013
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

david_r
Celebrity
  • April 24, 2013
The pysvg module might also be of interest.

 

 

David

mark2atsafe
Safer
Forum|alt.badge.img+44
  • Safer
  • April 25, 2013
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

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings