[postgis-devel] Canonical binary form AND WKB
strk at refractions.net
strk at refractions.net
Tue Dec 21 07:23:27 PST 2004
On Tue, Dec 21, 2004 at 01:48:21PM +0100, Markus Schaber wrote:
> Hi, Strk,
>
> On Mon, 20 Dec 2004 16:15:34 +0100
> strk at refractions.net wrote:
>
> > If we made the canonical form == internal form we'll have
> > many troubles when willing to change internal form and
> > accept restores from 'old' dumps.
>
> You're right. This would be a point where internal form and canonical
> form would be forced to fork.
>
> > Also, needs of internal storage are different from needs
> > of data exchange. For internal storage we want a representation
> > which is performant and small in size. For exchange we want
> > a representation which is stable, essencial and portable.
>
> Yes, I thought to short. I had simplicity of current code in mind,
> instead of extensibility.
>
> So using an thoughtful designed EWKB as canonical format will allow us
> to keep the format for the next few generations.
>
> But I still vote for canonical text to be hex(canonical binary) instead
> of "SRID=42;"+hex(canonical binary without srid). Having the SRID in
> plain text does not help anything as the actual data is still not human
> readable, and it complicates parsing and generation of canonical text
> format.
>
> Maybe I can do some code experiments about this, but not before the
> second week in Jan.
Ok. I've reverted canonical binary form (and bytea casts) back
to EWKB input/output and extended EWKB with a SRID presence flag
and int4 storage (if present) right after wkbtype.
HEXEWKB does not need SRID=#; anymore, but still accepts it for
old dumps.
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.
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?).
--strk;
>
> Markus
> --
> markus schaber | dipl. informatiker
> logi-track ag | rennweg 14-16 | ch 8001 zürich
> phone +41-43-888 62 52 | fax +41-43-888 62 53
> mailto:schabios at logi-track.com | www.logi-track.com
> _______________________________________________
> 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