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
  • 453 views

mtm102582
Contributor
Forum|alt.badge.img+1

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

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.

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3699 replies
  • January 13, 2023

mtm102582
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • 3 replies
  • January 13, 2023

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
  • 8391 replies
  • 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+58
  • Evangelist
  • 932 replies
  • Best Answer
  • January 13, 2023

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

HEX-Encoded_WKB


mtm102582
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • 3 replies
  • January 13, 2023

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!