Skip to main content
Solved

Create a polygon from a set coordinates

  • October 30, 2018
  • 5 replies
  • 1957 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

View original
Did this help you find an answer to your question?

5 replies

erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • 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
  • October 30, 2018
erik_jan wrote:

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+32
  • Influencer
  • Best Answer
  • October 30, 2018

You want a line builder after your vertex creator


Forum|alt.badge.img
  • Author
  • October 30, 2018
ebygomm wrote:

You want a line builder after your vertex creator

That was it. Thanks much !!!

 

 


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • October 30, 2018
sebascote wrote:
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


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