[postgis-devel] design of SERIALIZED_LWGEOM/LWGEOM/PG_LWGEOM

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Mon Apr 7 08:46:17 PDT 2008


On Monday 07 April 2008 15:24:16 jiong wrote:
> I am reading postgis code of function LWGEOM_in:
> in older version: wkt -> PG_LWGEOM
> in newer version: wkt -> SERIALIZED_LWGEOM -> LWGEOM -> PG_LWGEOM
>
> So my question are:
>
> (1)SERIALIZED_LWGEOM and PG_LWGEOM have the same serialized format except
> for the member of size's position?
> (2) if SERIALIZED_LWGEOM for code isolation of parser and postgis, why not
> use
> wkt -> SERIALIZED_LWGEOM -> PG_LWGEOM directly?
>
> any idea?

I suspect that this is part of the changes to enable PostGIS to work with 
PostgreSQL 8.3 and greater. The reason it is like this is because when I made 
the changes, I was hesitant to go through the code and change everything to a 
single common form - it is extremely easy to break things, especially against 
older versions of PostgreSQL :(

The idea of being able to tidy this up, along with the I/O functions has been 
on my personal TODO list for a while. However, due to the large amount of 
changes involved, it's going to have to wait for at least a 1.4 series, or 
maybe even 2.0...


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