Skip to main content
Solved

Create a polygon from a set coordinates

  • October 30, 2018
  • 5 replies
  • 2440 views

Forum|alt.badge.img

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.

Best answer by ebygomm

You want a line builder after your vertex creator

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

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • October 30, 2018

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.


Forum|alt.badge.img
  • Author
  • 5 replies
  • October 30, 2018

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).

 

 


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3429 replies
  • Best Answer
  • October 30, 2018

You want a line builder after your vertex creator


Forum|alt.badge.img
  • Author
  • 5 replies
  • October 30, 2018

You want a line builder after your vertex creator

That was it. Thanks much !!!

 

 


erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • October 30, 2018
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.