[postgis] Well-Known Binary

Paul Ramsey pramsey at refractions.net
Mon Jun 4 21:02:55 PDT 2001


One of the things which crops up alot in talk about OpenGIS is the
Well-Known Binary format. We have talked about implementing it in some
manner (Dave's internal representation is not far from WKB, in alot of
ways) but have come up against an interesting pgsql quirk: almost all of
the input and output in pgsql is done via text representations.
Certainly, if you are going at pgsql via the JDBC interface, your
conversion with the server is in text, even if you don't see it, because
the JDBC driver works against a standard text cursor.

Now, Pgsql supports binary cursors, and I am pretty sure at this point
that we could set up some functions which allow input and output of WKB
via a binary cursor, but those cursors will only be available to people
writing interfaces via libpq. Once you start playing with binary cursors
there are also issues of endianness to worry about: if you access a
server running on a big-endian server (solaris on sparc, say) from a
little endian client (a linux box on intel) then there will be endian
issues. Fortunately, WKB has an endian flag so in theory everything will
still be hunky dory.

Does anyone have any interest in WKB? Is anyone using it? The only
reason I can see for pursuing it is for performance: the thought of all
the text->machine->text->machine translations that would be required to
tie postgis to some kind of client implementation is starting to give me
pause. Things could end up very slow. Thoughts?

To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 





More information about the postgis-users mailing list