Solved

Deconstructing polygons


Badge

Hello,

I have polygons that are constructed from lines using line closer and area builder so i could add some attributes from other features. Now i need to deconstuct back to lines with those attributes. Unfortunately i had no luck searching the forum for related issues. Any help?

icon

Best answer by jkr_wrk 30 May 2018, 11:53

View original

7 replies

Userlevel 2
Badge +17

Hi @luckym, if you set 'Yes' to the Preserve Lines as Path Segments parameter in the AreaBuilder, you can restore the original lines with applying the GeometryCoercer (Geometry Type: fme_line) and the PathSplitter after adding some attributes to the area.

Optionally, you can also restore attributes of the original lines, if you preserve them using the Generate List option in the AreaBuilder and then set the list to the List Attribute parameter in the PathSplitter.

Badge

Hi @luckym, if you set 'Yes' to the Preserve Lines as Path Segments parameter in the AreaBuilder, you can restore the original lines with applying the GeometryCoercer (Geometry Type: fme_line) and the PathSplitter after adding some attributes to the area.

Optionally, you can also restore attributes of the original lines, if you preserve them using the Generate List option in the AreaBuilder and then set the list to the List Attribute parameter in the PathSplitter.

Hi, @takashi, thank you very much, this did the job but I found out that it is not enough for me. Is it possible that every polygon retain all the lines that construct them? Basically i would doubling the amount of lines. Something like Chopper with polylines and start and end points of lines that construct the polyline.

 

 

Userlevel 3
Badge +17

Maybe use a GeometryExtractor first to store Geometry into Attribute. Then select Generate List within the LineBuilder. And then after all the Transforming use the ListExploder to go back to the individual Features and restore the Geometry with the GeometryReplacer?

Userlevel 2
Badge +17

Hi @luckym, if you set 'Yes' to the Preserve Lines as Path Segments parameter in the AreaBuilder, you can restore the original lines with applying the GeometryCoercer (Geometry Type: fme_line) and the PathSplitter after adding some attributes to the area.

Optionally, you can also restore attributes of the original lines, if you preserve them using the Generate List option in the AreaBuilder and then set the list to the List Attribute parameter in the PathSplitter.

I think a polygon retains all lines as its boundary. What do you mean "retains all the lines"?

 

 

Badge
I think a polygon retains all lines as its boundary. What do you mean "retains all the lines"?

 

 

You are right @takashi, as always. I was grouping my features wrong so my output was therefore wrong. Thank you again.

 

Badge

Maybe use a GeometryExtractor first to store Geometry into Attribute. Then select Generate List within the LineBuilder. And then after all the Transforming use the ListExploder to go back to the individual Features and restore the Geometry with the GeometryReplacer?

Hi @jkr_da i will try your suggestion and comment on this post for future generations of FME Q&A; Forum users. Thank you for your input.

 

Badge

Maybe use a GeometryExtractor first to store Geometry into Attribute. Then select Generate List within the LineBuilder. And then after all the Transforming use the ListExploder to go back to the individual Features and restore the Geometry with the GeometryReplacer?

This solution works as good as previous one. Even better when you have donut polygon. PathSplitter leaves this kind of polygons as polygons not line segments. Thank you once again @jkr_da

 

Reply