[postgis-commits] svn - r3269 - branches/1.3/lwgeom
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Fri Nov 7 03:47:26 PST 2008
Author: mcayland
Date: 2008-11-07 03:47:12 -0800 (Fri, 07 Nov 2008)
New Revision: 3269
Modified:
branches/1.3/lwgeom/lwgeom_functions_basic.c
Log:
Fix GBT#70: ST_NPoints Crashes with Curves. lwgeom_npoints() needs to know about the new lwgeom_getcurve_inspected() function.
Modified: branches/1.3/lwgeom/lwgeom_functions_basic.c
===================================================================
--- branches/1.3/lwgeom/lwgeom_functions_basic.c 2008-11-07 11:41:23 UTC (rev 3268)
+++ branches/1.3/lwgeom/lwgeom_functions_basic.c 2008-11-07 11:47:12 UTC (rev 3269)
@@ -205,6 +205,7 @@
LWLINE *line=NULL;
LWPOINT *point=NULL;
LWPOLY *poly=NULL;
+ LWCURVE *curve=NULL;
uchar *subgeom=NULL;
point = lwgeom_getpoint_inspected(inspected, i);
@@ -231,6 +232,13 @@
continue;
}
+ curve = lwgeom_getcurve_inspected(inspected, i);
+ if (curve != NULL)
+ {
+ npoints += curve->points->npoints;
+ continue;
+ }
+
subgeom = lwgeom_getsubgeometry_inspected(inspected, i);
if ( subgeom != NULL )
{
More information about the postgis-commits
mailing list