design of SERIALIZED_LWGEOM/LWGEOM/PG_LWGEOM

View: New views
2 Messages — Rating Filter:   Alert me  

design of SERIALIZED_LWGEOM/LWGEOM/PG_LWGEOM

by jiong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?

Re: design of SERIALIZED_LWGEOM/LWGEOM/PG_LWGEOM

by Mark Cave-Ayland-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
_______________________________________________
postgis-devel mailing list
postgis-devel@...
http://postgis.refractions.net/mailman/listinfo/postgis-devel