Skip to main content
Question

Creating polygon using points stored in CSV

  • June 13, 2013
  • 4 replies
  • 31 views

Forum|alt.badge.img+1
I have CSV file as input which holds xy co ordinates, I want to use these co ordinates to make polygon geometries which is to be written to oracle spatial.

 

 

Can anybody help me in choosing the right transformers for this process.
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

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • June 13, 2013
Hi,

 

 

Do you have an ID that defines the grouping of points into individual polygons?

 

If so then you can use the point connector (connection break attributes : ID).

 

 

Itay

 

 


david_r
Celebrity
  • June 13, 2013
Hi,

 

 

it depends on your CSV, but here are some starting points:

 

  • 2DPointReplacer to create points from a coordinate (X,Y) value 
  • 2DPointAdder to add another coordinate to an existing point so as to form a line, or to add a vertex to an existing line
  • LineJoiner to join separate line segments (hint: features must enter in the correct order, use a Sorter first).
  • LineCloser to close a line segment into a polygon
They are all documented in the FME Desktop help.

 

 

David

Forum|alt.badge.img+1
  • Author
  • June 13, 2013
The CSV I am talking about holds the co ordinates in 

 

 

Col1 (X1)  |  Col2 (Y1)  |  Col3 (X2)  |  Col4(Y2)

 

 

 

And I have to read the points using point1(x1,y1), point2(x1,y2), point3(x2,y2), point4(x2,y1)

takashi
Celebrity
  • June 13, 2013
Hi,

 

 

you can do that based on David's suggestion. Try connecting these transformers in a series: 2DPointReplacer  X = col1, Y = col2 2DPointAdder  X = col1, Y = col4 2DPointAdder  X = col3, Y = col4 2DPointAdder  X = col3, Y = col2 LineColser (or 2DPointAdder  X = col1, Y = col2)

 

Takashi