Skip to main content
Question

polylines -> lines

  • October 1, 2013
  • 5 replies
  • 293 views

Forum|alt.badge.img
Guys, I need yous help,

 

 

I'm dealing with a dxf file which contains lines and polylines (autocad_lwpolyline and autocad_line). I'd like to convert these polylines into lines. How to do that?

 

 

I think, The first operation must be to add point on every edges of the polylines and then to cut them using these created points. Does anybody know how to add these points ?

 

 

thank's in advance for your answers

 

 

Régis 
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.

5 replies

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • October 1, 2013
Hi,

 

 

You can use the chopper (set on 1 vertice) to get all the vertices of the polylines.

 

After that the PointOnLineOverlayer can split the polylines to lines with your created vertices.

 

As an alternative you can try to set the geometry to fme_line with the GeometryCoercer.

 

Hope this helps,

 

 

Itay

david_r
Celebrity
  • October 1, 2013
Hi,

 

 

there is no need to use the PointOnLineOverlayer. Just set the Chopper for 2 vertices, and you're done.

 

 

This will split any polyline into line segments with only two vertices.

 

 

David

takashi
Celebrity
  • October 1, 2013
Hi Regis,

 

 

If you need to split a line having 3 or more vertices into individual line segments (just 2 vertices), you can use the Chopper with these settings simply.

 

Mode: By Vertices

 

Maximum Vertices: 2

 

Takashi

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • October 1, 2013
true, overcomplicated it....

Forum|alt.badge.img
  • October 2, 2013
Regis,

 

there is a transformer called Geometry filter, that can help you to identify all of the line geometries. I would suggest to review random cad files as i had a sitiation were lines were converted to Polygons in CAD. In the case you can use the donuthole extractor and collect the outer shell as a line.

 

Once you have the desired geometries as lines you can do as Takashi recomended.

 

 I hope this helps