A table Oracle have a Shape field of type SDE.ST_GEOMETRY, I want to convert it to latitude and longitude.
I need the Latitude and Longitude to build dynamic maps on Google Maps.
I saw on the Internet this tip, I tried this:
SELECT sde.ST_X(shape) x, sde.ST_Y(shape) y FROM pontes;
But returned this:
X | Y
692789,990308064 | 7020476,32990657
I think these are coordinates (XY) ArcGIS, but I need the latitude and longitude.
How do I convert a Shape (SDE.ST_GEOMETRY) to Latitude and Longitude?
Best Answer
This is giving you the lat/long for your geometry, but it looks like your data is in some sort of feet-based projection like state plane. If you're wanting to display the coordinates in a system that's readable by Google Maps, you'll need to transform the point. Not sure about the syntax for SDE in Oracle, but in PostGIS it's something similar to:
For additional information see the help page.