[postgis-devel] Question about Postgis serialisation to postgresql varlena

Karel Maesen karel at geovise.com
Wed Aug 26 01:27:25 PDT 2015


Hi list,

I’m the lead developer of Hibernate Spatial. Hibernate Spatial adds support for spatial types and operations to the Hibernate Object-Relation Mapping, which is very popular in the Java world. 

Recently I started using my own code to perform the deserialisation from Postgis Geometry to Java objects. As reference I used the description in the source file ./postgis/SERIALIZED_FORM and https://trac.osgeo.org/postgis/wiki/DevWikiPostGISCoding. I was under the impression that, at least from version 1.0 of Postgis, this file documents the internal varlena serialisation format of the Geometry type. 

Now I have received a bug report saying that the deserialization of a geometry failed. Apparently the Geometry returned from the database is encoded in an EWKT text value, not the binary object described in SERIALIZED_FORM.  

Is it possible that a Postgis 1.5.2 database contains geometries serialized as EWKT text? Could any of the Postgis developers confirm that the format in SERIALIZED_FORM is the only format possible?

Regards,

Karel Maesen




More information about the postgis-devel mailing list