3

I have the following ewkb strings from PostGIS:

01 01000020 E6100000 AECB9307F9D81240 0F2ADCE003704940

01 01000020 E6100000 7EAA0A0DC4920DC0 5AF0A2AF201F4440

I've been able to understand every data field except from the bolded ones, those are supposed to be binary masks to specify that the data represents a point and some extra info, but I've not been able to guess what masks and how are they applied in this particular case.

3

The fact that there is an SRID number (4326 in your case) coming after the type number needs to be flagged, since SRID's are an optional component of EWKB. The number you are seeing is composed of the type on the bottom byte and the "has an SRID" mask on the upper byte.

https://github.com/postgis/postgis/blob/svn-trunk/liblwgeom/liblwgeom.h.in#L84

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.