[postgis-users] PostGIS and LIDAR Massive Point Sets
Paul Ramsey
pramsey at refractions.net
Tue Feb 17 10:24:43 PST 2004
David Blasby wrote:
> The WKB representation for a 2d point has 5 bytes of overhead (endian
> flag and a 4-byte type tag) for a total of 21 bytes. WKB of a 3d point
> also has 5 bytes of overhead, for a total of 29 bytes. Postgresql has a
> further 4 bytes of overhead.
You know, one of the reasons WKB (and PostGIS internals) structures
carry extra overhead is because they are general structures -- all
geometry types are represented with the same structure. Which is kind of
wasteful when you think that PostgreSQL itself is also taking overhead
to describe the object type. If we actually had the full 7 geometry
types in PostgreSQL as full fledged types we could have the optimal
storage for each (why store a bounding box for a point? it's a
*point*!). The main argument against this is a code maintenance one --
index bindings for each type, instead for just one.
It is a hard call, since the only reasons to do this kind of reworking
are potential performance increases, and we have no quantification of
performance gains to expect. The only thing we *do* know for sure is
that this kind of optimization would save some disk space.
P.
--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey at refractions.net
| Phone: (250) 885-0632
\_
More information about the postgis-users
mailing list