[postgis-devel] liblwgeom.so

Sandro Santilli strk at keybit.net
Mon Sep 12 23:00:43 PDT 2011


On Mon, Sep 12, 2011 at 09:30:17PM +0000, Bryce L Nordgren wrote:
> On Mon, Sep 12, 2011 at 8:52 PM, Paul Ramsey <pramsey at cleverelephant.ca> wrote:
> >> 2) Ability to offer some aspects of PostGIS API externally for people
> >> writing their own custom converters/importers
> >
> > I feel like a better approach for the overall foss4g ecosystem, and
> > for our own internal work would be to have those aspects of the API in
> > OGR, which is already a system level utility library.
> 
> My original thought with #2 was not limited to custom
> converters/importers: It is my impression that if anyone, anywhere is
> to have even the option of writing a postgresql module which interacts
> with geometry, raster, or topology data types, they have to have
> access to your serialization/deserialization routines (and probably
> your accessors and/or methods). Adding this to OGR doesn't seem to be
> aligned with OGR's mission.

For a testimonial, I've been doing this with pre-lwgeom postgis, writing
a module that did: SWF layers output, vertex density analisys, grid snapping
and DP simplification. 2 of those 4 functions were later moved into the 
postgis core, but was easy as everything was already integrated.
Only, I had to statically link against a private library, so required the
postgis _source_ code rather than a postgis-dev package installed.
Also, the code broke easily with hwgeom lib api changes.

> Failing to provide this is like postgresql failing to provide a way to
> detoast an int. :) Or keeping the plus operator "server-private".
> 
> So: Is there a non-system-liblwgeom way to detoast a geometry from a
> non-postgis module? If so, I'm a happy camper.

Eh, there's the static non-system-liblwgeom way (requiring postgis source
code to build). Thinking about it another limit of that would also be that
on ABI changes your module becomes incompatible in unexpected ways...
That aspect really calls for a dynamically linked postgis module as well.

--strk; 

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list