Skip to main content
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 
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
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
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
true, overcomplicated it....
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

Reply