Question

turning fields like "POINT(x_value y_value)" into point features coordinates


Badge

I have a csv file that has a column for coordinates that is created like "POINT(x_value, y_value)". I want to turn this into the features x and y value. What is the best way to go about this. I was thinking first of doing it in python but wondering if FME had a way to do it. It looks like this row was created to be similar to a wkt column. Any suggestions on how to turn that into the point features coordinates that would be very helpful.


2 replies

Badge +22

If your attribute is indeed in WKT format, than you can use a GeometryReplacer with the Geometry Encoding set to OGC Well Known Text and the Geometry Source as the attribute containing the POINT(x y).

 

 

If it isn't (ex the lat longs are reversed) then you can parse the attribute with a stringSearcher or attributeSplitter wo get the x value and yvalue as seperate (list) attributes and use a vertexCreator to make the point.
Badge

If your attribute is indeed in WKT format, than you can use a GeometryReplacer with the Geometry Encoding set to OGC Well Known Text and the Geometry Source as the attribute containing the POINT(x y).

 

 

If it isn't (ex the lat longs are reversed) then you can parse the attribute with a stringSearcher or attributeSplitter wo get the x value and yvalue as seperate (list) attributes and use a vertexCreator to make the point.

Thanks, I knew FME prob had a tool but could not think of it.

Reply