[postgis-devel] What am I missing??

Nicklas Avén nicklas.aven at jordogskog.no
Sun Nov 15 08:24:21 PST 2009


Hallo
 
I'm trying to get my distance-code working with LWGEOM from early in the process. From some hours of frustration I have to ask what I'm missing. 
 
If I look at lwgeom_deserialize()   http://postgis.refractions.net/documentation/postgis-doxygen/d3/dc8/lwgeom_8c-source.html#l00022
 
I see that the function is returning tye LWGEOM 
LWGEOM looks like this:
typedef struct
{
 uchar type;
 BOX2DFLOAT4 *bbox;
 uint32 SRID; 
 void *data;
}
LWGEOM;
 
so it needs 16 bytes (?) according to sizeof()
 
But lwgeom_deserialize is also supposed to return Multigeometries and linestrings and polygons. Thosa all have an integer more than LWGEOM.The integer number of geometries for Multi geometries and number of rings for LWPOLY. That makes those types needing 20 bytes.
 
I wouldn't dare to say something is wrong here but I get strange server crashes when using lwcollection_getsubgeom()
Since I don't see lwcollection_getsubgeom() is used by any other process I get little suspicous that it is not that hard tested.
I hope I'm just stupid here, but want to find out in what way :-)
 
Thanks
Nicklas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20091115/c604510c/attachment.html>


More information about the postgis-devel mailing list