[postgis-devel] urgent bug in LWGEOM WKB input/output

strk at refractions.net strk at refractions.net
Fri Oct 15 00:35:38 PDT 2004


Sorry, I *did* introduce the bug.
I RTFM, and OGC WKB actually requires both 'type' AND 'byteorder'
in inner geometries (what a waste!).
Now it is fixed.
--strk;

On Thu, Oct 14, 2004 at 02:02:00PM +0200, strk at refractions.net wrote:
> I've found WKB input/output of LWGEOM to be bogus.
> If I fully understood the problem Ralph Mason
> parser/unparser uses the canonical HEXWKB form
> which is sligtly larger then WKB.
> 
> This is for multitypes: a MultiPoint in canonical form has:
> 	type: byte + MZ flags
> 	npoints: 4bytes
> 	POINT {
> 		type: byte + MZ flags
> 		coords
> 	}
> 
> The second 'type' (the one inside POINT) is useless.
> This is true for both WKB and canonical form.
> 
> For WKB this is not only useless but also Malformed.
> the lwgeom_inout.c contains the WKB output, which
> basically invoke the HEXWKB output and transform it
> from HEX to binary...
> 
> Did I introduce the bug or does it ring a bell for
> Dave and Ralph ?
> 
> Note that I surely introduced a bug in the dumper because
> I was initially convinced the WKB was good and the dumper
> bogus...
> 
> --strk;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list