[postgis-devel] Canonical binary form AND WKB
strk at refractions.net
strk at refractions.net
Wed Dec 22 00:35:02 PST 2004
On Tue, Dec 21, 2004 at 11:45:21PM +0100, Markus Schaber wrote:
> 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.
mmm... not that easy, as both GeoemtryFromText and GeomFromWKB take
the SRID as an additional argument, so we can't do the check afterwards,
but just in the parser.
We could add a flag to the parser to enforce 'OGC' compliance, I'll think
about it.
--strk;
>
> Thanks,
> Markus
> _______________________________________________
> 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