[postgis-commits] svn - r3656 - spike/wktraster/rt_core
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Fri Feb 6 00:59:42 PST 2009
Author: strk
Date: 2009-02-06 00:59:41 -0800 (Fri, 06 Feb 2009)
New Revision: 3656
Modified:
spike/wktraster/rt_core/rt_api.c
spike/wktraster/rt_core/rt_api.h
Log:
document return code from rt_raster_get_envelope, more error handling in implementation of it
Modified: spike/wktraster/rt_core/rt_api.c
===================================================================
--- spike/wktraster/rt_core/rt_api.c 2009-02-06 08:46:13 UTC (rev 3655)
+++ spike/wktraster/rt_core/rt_api.c 2009-02-06 08:59:41 UTC (rev 3656)
@@ -1073,7 +1073,13 @@
POINT4D p4d;
rings = ctx->alloc(sizeof(POINTARRAY*));
+ if ( ! rings )
+ {
+ ctx->err("Out of memory [%s:%d]", __FILE__, __LINE__);
+ return 0;
+ }
rings[0] = ptarray_construct(0, 0, 5);
+ /* TODO: handle error on ptarray construction */
pts = rings[0];
/* Upper-left corner (first and last points) */
Modified: spike/wktraster/rt_core/rt_api.h
===================================================================
--- spike/wktraster/rt_core/rt_api.h 2009-02-06 08:46:13 UTC (rev 3655)
+++ spike/wktraster/rt_core/rt_api.h 2009-02-06 08:59:41 UTC (rev 3656)
@@ -473,6 +473,8 @@
* @param ctx : context for thread safety
* @param raster : the raster to get info from
*
+ * @return the envelope, or NULL on error.
+ *
*/
LWPOLY* rt_raster_get_envelope(rt_context ctx, rt_raster raster);
More information about the postgis-commits
mailing list