Skip to main content
Solved

I'm working with a geometry in wkt. I would like to convert to lat, long and elev using FME. I can do conversion using SQL using "select ST_AsText(geom)". I've tried the geometry extractor translator and it just gives errors. There is an example be

  • January 13, 2023
  • 5 replies
  • 381 views

Forum|alt.badge.img

Line:

01020000A0E610000005000000E040A17B843554C0C987F51E7593414000000000000000006CDB4900853554C0AFD3A0F17893414000000000000000002D2683FB813554C0D677B1BD8E93414000000000000000005A484B8E7F3554C025457646AB9341400000000000000000C4B449797B3554C01A0A32C8AC9341400000000000000000

 

Using SQL the wkt converts to these 5 points: 

 -80.83621111628918 35.15201174725332 0,

-80.83624274456605 35.15212841370464 0,

-80.83605850036174 35.1527936092895 0,

-80.83591039039439 35.15366440558345 0,

-80.83566124151099 35.15371038859685 0

 

Lat and long are also reversed in the output. I would like to do this conversion in FME for spatial analysis of the full data base.

 

Thank you,

Matt

 

Best answer by geomancer

Your input data turns out to be in HEX Encoded OGC Well Known Binary format.

HEX-Encoded_WKB

View original
Did this help you find an answer to your question?

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

Forum|alt.badge.img
  • Author
  • January 13, 2023
redgeographics wrote:

But how do you read wkt in fme and write to lat, long, elev. ​ I have not been successful with this. I can only get it to work in sql.


david_r
Celebrity
  • January 13, 2023

My preference would be to cast the geometry column to WKB (if possible, it's more efficient than WKT) in SQL and then use the GeometryReplacer set to WKB in your FME workspace to rebuild the actual geometry. Finally, use e.g. the CoordinateExtractor to get the numerical values for each vertex.


geomancer
Evangelist
Forum|alt.badge.img+48
  • Evangelist
  • Best Answer
  • January 13, 2023

Your input data turns out to be in HEX Encoded OGC Well Known Binary format.

HEX-Encoded_WKB


Forum|alt.badge.img
  • Author
  • January 13, 2023
geomancer wrote:

Your input data turns out to be in HEX Encoded OGC Well Known Binary format.

HEX-Encoded_WKB

Thank you! I'm back in business!


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