Skip to main content
Question

Create polygon feature from CSV

  • December 18, 2017
  • 4 replies
  • 148 views

kumarkannan1980
Participant
Forum|alt.badge.img+6

Hi,

I have set of coordinates for a polygon in CSV format, I need to create the polygon from the coordinate in FME. Kindly let me know which transformer I have to use.

Regards

K.Jayakumar

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.

4 replies

erik_jan
Contributor
Forum|alt.badge.img+23
  • Contributor
  • December 18, 2017

Have a look at the GeometryReplacer transformer.

If you can format the coordinates (usually as WKT) you can create the polygon using that transformer.


david_r
Celebrity
  • December 18, 2017

Here's one way, assuming you have an attribute containing the polygon ID and the CSV has the polygon vertices in the correct order:

  1. VertexCreator to convert X,Y values to point geometry
  2. LineBuilder, connection break attribute = your polygon ID
  3. LineCloser, only necessary if the polygons don't close completely
  4. GeometryCoercer set to "fme_polygon" (alternatively look at the AreaBuilder if you have donuts etc)

If you need more specific instructions, consider posting a small sample CSV dataset.


takashi
Celebrity
  • December 18, 2017

Depending on the actual schema of the CSV. If you could post a sample data, it would help us to think of a suitable way.


kumarkannan1980
Participant
Forum|alt.badge.img+6

Here's one way, assuming you have an attribute containing the polygon ID and the CSV has the polygon vertices in the correct order:

  1. VertexCreator to convert X,Y values to point geometry
  2. LineBuilder, connection break attribute = your polygon ID
  3. LineCloser, only necessary if the polygons don't close completely
  4. GeometryCoercer set to "fme_polygon" (alternatively look at the AreaBuilder if you have donuts etc)

If you need more specific instructions, consider posting a small sample CSV dataset.

Thanks it is working