Skip to main content
Question

Create polygon feature from CSV

  • December 18, 2017
  • 4 replies
  • 118 views

Forum|alt.badge.img+1

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

4 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • 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
Influencer
  • 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.


Forum|alt.badge.img+1
david_r wrote:

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

 

 


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