[postgis-devel] Canonical binary form AND WKB

Markus Schaber schabios at logi-track.com
Tue Dec 21 14:45:21 PST 2004


Hello, Strk,

strk at refractions.net schrieb:

> What is left now is *strict* OGC WKB I/O.
> For output we can just *downgrade* geometries to be OGC compliant
> (strip Z,M and SRID) very easily.

Yes, just call force2d and remove the SRID, and then call the usual
output function. Should there be a warning when the user tries to output
a non-compliant geometry this way, so we do not have silent loss of
data?

> For input I'm afraid we'll need a separate parser, to allow for
> EWKB <future>WKB clashes.
> I guess this can be done when WKB-ng is out (why run?).

Yes, I think we can delay a separate parser until we acutally have a
collision between EWKB and <future>WKB.

Maybe we can even make your EWKB the official WKB 2.0, lets see.

But for now, we should discourage users of GeometryFromWKB() to put EWKB
in it, perhaps by testing the dimensions and SRID after parsing and
issuing a warning.

Thanks,
Markus



More information about the postgis-devel mailing list