Skip to main content
Question

How to create lines from polygons?


I'm doing a dgn to ArcSDE ETL of floor plan lines (fpl) using FME Desktop.  Some of the fpl are "shapes" in the dgn.  I don't know much about cad or dgn but I believe shapes are polygons.  Is there any way to convert these "shapes" to lines?  For example, there are some rectangular shapes.  Can one of these shapes somehow be exploded and converted into four lines?

 

 

Thank you

7 replies

takashi
Contributor
Forum|alt.badge.img+23
  • Contributor
  • June 27, 2013
Hi Steve,

 

 

You can use the Chopper (Mode = By Vertex, Maximum Vertices = 2) to divide the exterior line of a polygon into segments.

 

 

Takashi

david_r
Evangelist
  • June 27, 2013
Hi,

 

 

the easiest is to use the GeometryCoercer with type "fme_line" as output.

 

 

David

takashi
Contributor
Forum|alt.badge.img+23
  • Contributor
  • June 27, 2013
Yeah, my first inspiration was also the GeometryCoercer, but from the last sentence of the question "... be exploded and converted into four lines", I thought the line has to be divided into segments.

 

To just transform a polygon to a line, the GeometryCoerser is the easiest solution as David mentioned :-)

 

 

Takashi

  • Author
  • June 27, 2013
Thanks guys!  I did incorporate GeometryCoercer but could not figure out how to chop the lines into individual segments.  Chopper did the trick!

  • Author
  • June 27, 2013
It looks like with Chopper, I don't even need GeometryCoercer.  It takes a polygon, a rectangle for example, and breaks it down into four polylines.  Cool!

takashi
Contributor
Forum|alt.badge.img+23
  • Contributor
  • June 27, 2013
Hi Steve,

 

 

Glad to know you achieved the purpose. Yes, the Chopper breaks a polygon into lines if you set 2 or 3 to the "Maximum Vertices" parameter. Note that it creates chopped polygons when you set 4 or greater to the parameter.

 

 

Cheers!

 

 

Takashi

  • Author
  • June 27, 2013
Good to know, thanks Takashi!

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