[postgis-devel] lwgeom_getsrid()

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Thu Aug 11 01:07:01 PDT 2011


On 11/08/11 08:10, Sandro Santilli wrote:

>> I'm getting a little turned around with all the different forms I can find
>> geometries in. What is (uchar *) and how does it relate to PG_LWGEOM, LWGEOM
>> and friends? Specifically, if I have a (LWGEOM *), how do I get a (uchar *)?
>> This seems to be the only "accessor" method which doesn't take (LWGEOM *).
>
> I think all the "serialized" and "inspected" functions should be
> moved to liblwgeom_internal.h. You shouldn't be using those forms,
> surely not to get a SRID out of an LWGEOM.
> Current way to get it is trough LWGEOM.srid, altought we may add
> an lwgeom_get_srid(const LWGEOM*) to go along the existing
> lwgeom_set_srid(LWGEOM*, int).

I'd say once G_GEOMETRY is in we should ditch any functions using 
serialized/inspected forms permanently, as since we're not copying 
coordinate lists any longer the deserialisation process overhead should 
be very small.


ATB,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the postgis-devel mailing list