[postgis-devel] Re-organising the PostGIS codebase - to liblwgeom or not liblwgeom?

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Thu Apr 24 04:18:20 PDT 2008


Hi folks,

Just an update: after some initial hacking, I have managed to get knock 
together some test Makefiles that will build PostGIS using PGXS. The 
good news is that the build system is considerably simpler, and means we 
don't have to worry about keeping sync with the PostgreSQL build files.

The next question I have come across is related to liblwgeom: for those 
people who don't know, when PostGIS was re-written to use LWGEOMs, there 
was a concept that the basic geometry library would be separate from 
PostGIS and that majority of PostGIS was a set of PostgreSQL wrappers 
for this library.

The advantage of this approach would be that if people wanted to use 
LWGEOMs and/or PostGIS functions within their own programs from C, then 
they could do so. I know that there has been mention of people wanting 
to use PostGIS functionality within SQL-Lite on the mailing lists; if 
they could link to liblwgeom separately then it would considerably 
reduce the amount of work needed.

Having played with this idea in my testbed, we need to decide on a few 
issues:


1) Are people happy that this should be the way forward?

I haven't heard much in the way of comment, positive or negative, about 
the plan to re-organise the codebase. Should I take that has implicit 
agreement?

2) Do we wish to maintain the liblwgeom abstraction?

I'm leaning towards thinking that this is a good idea in terms of code 
re-use and unit testing. If so, should we link statically or dynamically 
with PostGIS? With dynamic linking, we would need to supply 2 library 
files rather than the 1 file with a standard PostGIS installation, but 
it would potentially be easier for other people to use.

3) Merging of code into SVN

I've done some experiments with regard to the abstraction, and there are 
two main work tasks: the first is to create the initial abstraction in 
the build system of which I have a very basic version here (statically 
linking into liblwgeom), and the second is to then re-arrange both 
liblwgeom and PostGIS by moving functionality into liblwgeom.

 From a development point of view, it would be best to branch 1.3.x and 
get this into SVN HEAD as soon as possible - however I appreciate that 
this round of changes will be quite invasive. I'm happy to work in a 
separate branch to begin with and then switch over to HEAD when the 
majority of things are working. Does that sound reasonable?


Comments, questions etc.?


ATB,

Mark.

-- 
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063



More information about the postgis-devel mailing list