[postgis-devel] Adding size to LWGEOM

Paul Ramsey pramsey at cleverelephant.ca
Wed Dec 24 12:25:27 PST 2008

As I fart around with building multi-geometries, I am getting
increasingly annoyed that I can't just efficiently add new geometries
to an existing object.  If LWGEOM had a size_t indicating how big the
allocated dynamic segment was, I could build a bunch of simple
accessors that filled out the allocated area, and doubled it when it
get too small.  Basically like the dynptarray idea, but in the main
objects. Since the LWGEOMs aren't serialized directly, there's no real
size penalty to doing this, i don't think (time to read the
serialize/deserialize code). and the on-disk format wouldn't change,
so it would be backward compatible.

This is an idle thought, it's certainly possible to code around this
(that's what I'm doing) but it just seems like I'm writing lots of
code that isn't strictly necessary.


More information about the postgis-devel mailing list