Search code examples
gpspostgis

Unknown postgis gps data format


A third-party program stores tracking data to the db, but I not understand the format. I know that postgis is working there and this column should contain GPS location(s) and maybe additional data.

Example (db dump as csv):

"Location","DateTime"
"010100000023E37C4023E33C40417F41EF407F4740","2020-05-24 15:33:53+00"

How can I decode Location column data?


Solution

  • This is Well-known binary format.

    See PostGIS methods for WKB: ST_AsBinary, ST_GeomFromWKB.
    WKT methods: ST_AsText, ST_GeomFromText.

    The example in WKT format: POINT(28.887256651392033 46.99416914651966).

    For .Net can use Geo, NetTopologySuite.IO.TinyWKB.