]> granicus.if.org Git - postgis/commitdiff
#2165, ST_NumPoints regression failure with CircularString
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 5 Jun 2013 20:38:56 +0000 (20:38 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 5 Jun 2013 20:38:56 +0000 (20:38 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11528 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
postgis/lwgeom_ogc.c
regress/sql-mm-circularstring.sql
regress/sql-mm-circularstring_expected

diff --git a/NEWS b/NEWS
index fb29634a3a438b1685723e0e272376a756ee9681..491223172c11db927513573f3fea12e65da64fa2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -184,6 +184,7 @@ PostGIS 2.1.0
   - #2019, ST_FlipCoordinates does not update bbox
   - #2100, ST_AsRaster may not return raster with specified pixel type
   - #2126, Better handling of empty rasters from ST_ConvexHull()
+  - #2165, ST_NumPoints regression failure with CircularString
   - #2182, Fix issue with outdb rasters with no SRID and ST_Resize
   - #2188, Fix function parameter value overflow that caused problems
            when copying data from a GDAL dataset
index 447e73f57def1badbcc454d9b56afa8353f289a3..10dd657474b872767999dc39d047a7e0a56e2626 100644 (file)
@@ -204,7 +204,7 @@ Datum LWGEOM_numpoints_linestring(PG_FUNCTION_ARGS)
        LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
        int count = -1;
        
-       if ( lwgeom->type == LINETYPE )
+       if ( lwgeom->type == LINETYPE || lwgeom->type == CIRCSTRINGTYPE )
                count = lwgeom_count_vertices(lwgeom);
 
        lwgeom_free(lwgeom);
index f97a168e8c1db9a809adff73f801009459570c61..28fcd6eea0297def3fbab8612da2e2a07bb29952 100644 (file)
@@ -278,4 +278,4 @@ SELECT DropGeometryColumn('public', 'circularstring', 'the_geom_3dm');
 SELECT DropGeometryColumn('public', 'circularstring', 'the_geom_2d');
 DROP TABLE public.circularstring;
 SELECT ST_AsText(st_snaptogrid(box2d('CIRCULARSTRING(220268.439465645 150415.359530563,220227.333322076 150505.561285879,220227.353105332 150406.434743975)'::geometry),0.0001));
-SELECT 'npoints_is_null',ST_NumPoints(ST_GeomFromEWKT('CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3)'));
+SELECT 'npoints_is_five',ST_NumPoints(ST_GeomFromEWKT('CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3)'));
index 8ce1708b149b8656bbd8b9ce301f8bcf3f7b3425..66b3c81561d6f11001d5ebd403496799581a1181 100644 (file)
@@ -105,4 +105,4 @@ public.circularstring.the_geom_3dz effectively removed.
 public.circularstring.the_geom_3dm effectively removed.
 public.circularstring.the_geom_2d effectively removed.
 POLYGON((220187.3821 150406.4347,220187.3821 150506.7171,220288.8159 150506.7171,220288.8159 150406.4347,220187.3821 150406.4347))
-npoints_is_null|
+npoints_is_five|5