Skip to main content
Question

Convert SVG path format to SDO_GEOMETRY

  • April 24, 2013
  • 3 replies
  • 42 views

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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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+59
  • 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