tech
asked on
How to convert geometry into latitude and longitude coordinates?
I have a column which contains geometry values (maps) like 01030009777700000000BCA142 E2ABD08A2C 0CA9466D8B 4B4CC. I wanted to convert it into latitude and longitude coordinates. I tried using geopandas but didn't click for me. Any help is appreciated.
What kind of encoding is it.... there must be some description.
ASKER
These are the hex values, very long sized characters and numbers. (they are polygons or lines)
ASKER
values are stored in postgresdatabase which i downloaded as csv and then i am trying using postgis. (ST_AsText which Returns the Well-Known Text (WKT) representation of the geometry/geography)
Best starting point will be to have one of your strings along with the related lat/long values.
This will tell you how to decode the string.
Without this correlation/relation as a string point, tough to guess about what your string might represent.
This will tell you how to decode the string.
Without this correlation/relation as a string point, tough to guess about what your string might represent.
ASKER
length of the strings vary as few are 50 characters long, others are 20 long. they are polygons and lines. I tried
which converts it into
POLYGON((0 0,0 1,1 1,1 0,0 0))
not sure how to extract lat/long values from this.
SELECT ST_AsText('01030000000100000005000000000000000000
0000000000000000000AB7600000000000000000000000
F03F000000000000F03F000000000000F03F000000000000F03
F0000000078540000000HFT000');
which converts it into
POLYGON((0 0,0 1,1 1,1 0,0 0))
not sure how to extract lat/long values from this.
There must be more data that is correlated. A Polygon is a geometric shape, with multiple corners. (0,0)->(0,1)->(1,1)->(1,0) ->(0,0).. which draws a closed square with size 1.
it doesn't tell where the square should be on the map.
it doesn't tell where the square should be on the map.
ASKER
Data represents field maps of an agricultural field, represents fields, zones in a farm.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks noci. I got it solved using shapely python library.