2

I need to extract coordinates of polygon boundary points in order to draw a map in my application. Does anyone know what is format of "GEOMETRY" column in this database? It doesn't look like .SHP format, rather something else.

I'm looking for a documentation or explaination the binary data, so I can use it.

This is sqlite example: https://github.com/nvkelso/natural-earth-vector/blob/master/packages/natural_earth_vector.sqlite

2

Oh, I think I found it by myself. It's "Well-known binary format". What an irony.

http://en.wikipedia.org/wiki/Well-known_text#Well-known_binary

I successfully used http://geophp.net/ programming library to operate on those geometry data.

  • If I'm not mistaken, Spatialite uses a special format for the Geometry databse "blob". Not exactly WKB. See here. If you need a standards compliant WKT or WKB representation, then you should use ST_AsText() or ST_AsBinary() . – Micha Jun 27 '14 at 11:03
  • 1
    I successfully used WKB programming library to decode this column, so I assume it's actually WKB. "Blob" is just container for any binary data (images, audio, whatever). – stil Jun 27 '14 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.