[postgis-users] Decoding canonical text of geometry(POINT) data
Rémi Cura
remi.cura at gmail.com
Tue Jul 1 06:34:33 PDT 2014
Or shapely, still in python.
You can also use Geos I guess, in C.
You can also go the command line way with ogr2ogr and gdal
(there are python and R binding).
I'm pretty sure you can find also web oriented parser.
Cheers,
Rémi-C
2014-07-01 14:38 GMT+02:00 Martijn Meijers <b.m.meijers at tudelft.nl>:
> On 07/01/2014 02:30 PM, Dmitry Dzhus wrote:
>
>> I have a database table with a `geometry(POINT, 4326)` column.
>>
>> I need to decode its canonical text representation in the form of
>>
>> 0101000020E61000008B20297D7CBF5440B2A19BFD81834B40
>>
>> into its components 82.9919732, 55.0274045 *without* calling PostGIS
>> functions like `st_x` and `st_y` (this is a limitation of the codebase
>> I'm working with — canonical text is all I have).
>> Could someone point me to any docs about the encoding details so
>> that I could reimplement it?
>>
>
> It's hexadecimal form of Well Known Binary (see "Simple Features
> Specification for SQL", and may be enriched with some specifics for
> postgis, such as srid).
>
> For a parsing implementation in Python see e.g.
>
> http://www.fabianowski.eu/projects/ppygis/
>
>
> Martijn
>
> --
> Martijn Meijers
>
> mailto:b.m.meijers at tudelft.nl
> http://www.gdmc.nl/martijn
>
> GIS-technology
> Faculty of Architecture and the Built Environment
> Delft University of Technology
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140701/e59cad54/attachment.html>
More information about the postgis-users
mailing list