I found in my database that shops location represented as geometry
datatype.
Is it possible to convert to lat
and long
coordinates and use it as input for bing maps?
Jan 2020: The previous formats shown threw the following error:
OperationalError: (1054, "Unknown column 'geometry_col.Long' in 'field list'")
However, this format worked:
SELECT ST_X(geometry_col) AS longitude,
ST_Y(geometry_col) AS latitude
FROM yourTable;
This works for geometry types in sql server
SELECT [Geometry].STX AS [Longitude],
[Geometry].STY AS [Latitude]
FROM YourTable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With