Skip to main content
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.
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

 

 


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

Reply