]> granicus.if.org Git - postgis/commitdiff
Don't segmentize geometry if input doesn't pass hasarc
authorPaul Ramsey <pramsey@cleverelephant.ca>
Mon, 9 Mar 2009 22:01:04 +0000 (22:01 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Mon, 9 Mar 2009 22:01:04 +0000 (22:01 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3820 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_sqlmm.c

index 8208a147dee0244cfa022ecc578bed8111264318..9cc1b060fb41c048749ac997580242ef94cd9f23 100644 (file)
@@ -69,6 +69,10 @@ Datum LWGEOM_curve_segmentize(PG_FUNCTION_ARGS)
         }
 #endif
         igeom = lwgeom_deserialize(SERIALIZED_FORM(geom));
+               if( ! has_arc(igeom) )
+               {
+                       PG_RETURN_POINTER(geom);
+               }
         ogeom = lwgeom_segmentize(igeom, perQuad);
         if(ogeom == NULL) PG_RETURN_NULL();
         ret = pglwgeom_serialize(ogeom);