[postgis-users] WKB vs WKT

Markus Schaber schabi at logix-tt.com
Sat Mar 5 00:18:43 PST 2005


Hi, Sean,

Sean M. Montague schrieb:
> I'm trying to figure out the advantages and disadvantages of WKT and
> WKB.  I've read that WKB is faster to process.

Yes, it usually is. But WKB - Well known binary - is not meant for human
readers, different to WKT which is rather readable by human beings.

For Documentation of WKT and WKB format, first read the OpenGIS
specification on this topic. This is what asText() and asBinary()
functions create.

AsEWKB and AsEWKT produce an extended form of those formats, they follow
the OpenGIS proposal for 2.5D, as well as including PostGIS specific
extensions for measures and SRID.

> Does this include the AsSVG function?

AsSVG produces neither WKB nor WKT, it produces text snippets that can
be used by an application to create SVG graphics.

> The PostGIS manual only gives examples of what WKT looks like.

Probably becauuse WKB is not really meaningful to human eyes.

markus

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org



More information about the postgis-users mailing list