Skip to main content

Hello,

What is the trick to create a polygon from a set of coordinates and make sure FME read the points in the order to create the required polygon where _result field can be used as ID and acknowledge the order in which polygon should be created ? I went thru a bunch of transformers, but I did not succeed with any... I went thru several articles from the knowledge center as well, but cannot figure it out. Hope the question makes sense.

Thank you for your inputs, regards.

Have a try at this sequence:

Sorter (sorting by _result if needed)

VertexCreator (create points from the coordinates, set to Add Point).

At the end this will create a line from the coordinates.

If the line is not a closed line, use LineCloser to connect last to first point.and create an area.

If the line is closed, use the AreaBuilder to create a polygon from the line.


Have a try at this sequence:

Sorter (sorting by _result if needed)

VertexCreator (create points from the coordinates, set to Add Point).

At the end this will create a line from the coordinates.

If the line is not a closed line, use LineCloser to connect last to first point.and create an area.

If the line is closed, use the AreaBuilder to create a polygon from the line.

Sorting was done. VertexCreator as well, however, I do not have any line after it. Just 622 dots, which is expected.

 

Tried LineCloser but it did not bring any value. I still have just my dots (review screenshot).

 

I tried to build up the polygon with AreaBuilder, but I do not see any options in the transformer that could make it work in my scenario and tell him which dots it should use to build the polygon (or area).

 

 


You want a line builder after your vertex creator


You want a line builder after your vertex creator

That was it. Thanks much !!!

 

 


Sorting was done. VertexCreator as well, however, I do not have any line after it. Just 622 dots, which is expected.

 

Tried LineCloser but it did not bring any value. I still have just my dots (review screenshot).

 

I tried to build up the polygon with AreaBuilder, but I do not see any options in the transformer that could make it work in my scenario and tell him which dots it should use to build the polygon (or area).

 

 

Sorry, I missed the LineBuilder after the VertexCreator.

 

 


Reply