Binary insert into geography column results in value being inserted as geometry.
|Reported by:||andrewdone||Owned by:||pramsey|
Please see example (in Java) attached. Here's what it does: 1) Creates a table with an ID and Geography(Point, 4326) 2) inserts a row using WKT. 3) inserts a row using WKB (as bytes). 4) Prints out id, point, and ST_SUMMARY(point).
— The result of step #4 is: ID: 1, WKB: 0101000020E610000009C6C1A5E3E662406BB75D68AEED40C0, Summary:Point[GS] ID: 2, WKB: 0101000020E610000009C6C1A5E3E662406BB75D68AEED40C0, Summary:Point[S] —
The documentation for ST_Summary would indicate that #2 has spatial information, but is not geodetic (i.e. not geography).
I'm writing a Java library that seeks to persist geography as binary, but this would seem to indicate that it isn't possible. Also, is it normal that this should be allowed to happen anyway (i.e. writing a value to a geography column that's not geography)?
— POSTGIS POSTGIS="2.1.3 r12547" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.7.1, 23 September 2009" GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER
— POSTGRES PostgreSQL 9.3.5 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit
Example Java is also available here: https://github.com/ayuudee/issue-pad/blob/master/src/com/jesusthecat/im/pggeog/BinaryGeogTest.java
Change History (16)
comment:11 by , 8 years ago
|Milestone:||PostGIS 2.1.4 → PostGIS 2.0.7|
|Status:||new → closed|
|Version:||2.1.x → 2.0.x|