[postgis-devel] Patching Envelope - Advice Needed
cfis at savagexi.com
Fri Sep 21 11:46:23 PDT 2007
Ok - I'm back to fixing up Envelope/Extent to return valid geometries -
as we've been discussion the last week on the mailing list.
Since I'm not that familiar with PostGIS I was wondering if someone
could provide advice. Is is okay to return the original geometry - to
should I make a copy. In my last patch I derialized a Point, created a
new one, and returned it. But would returning the geometry directly be
ok? Like this:
PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
POINT2D *pts = lwalloc(sizeof(POINT2D)*5);
SRID = lwgeom_getsrid(SERIALIZED_FORM(geom));
if (lwgeom_getType(geom->type) == POINTTYPE ||
lwgeom_getType(geom->type) == LINETYPE)
Or will that cause all sorts of havoc?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
More information about the postgis-devel