[postgis-commits] svn - r3253 - trunk/liblwgeom

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Wed Nov 5 03:06:23 PST 2008


Author: mcayland
Date: 2008-11-05 03:06:22 -0800 (Wed, 05 Nov 2008)
New Revision: 3253

Modified:
   trunk/liblwgeom/lwgeom.c
Log:
Fix for GBT#68 - ST_Shift_Longitude doesn't work with MULTIPOINT. Looks like this was just a simple mistake in the code. I've also improved the error message to return the proper type name instead of just a number.



Modified: trunk/liblwgeom/lwgeom.c
===================================================================
--- trunk/liblwgeom/lwgeom.c	2008-11-05 11:03:23 UTC (rev 3252)
+++ trunk/liblwgeom/lwgeom.c	2008-11-05 11:06:22 UTC (rev 3253)
@@ -768,6 +768,7 @@
 			for (i=0; i<poly->nrings; i++)
 				ptarray_longitude_shift(poly->rings[i]);
 			return;
+		case MULTIPOINTTYPE:
 		case MULTILINETYPE:
 		case MULTIPOLYGONTYPE:
 		case COLLECTIONTYPE:
@@ -776,8 +777,8 @@
 				lwgeom_longitude_shift(coll->geoms[i]);
 			return;
 		default:
-			lwerror("%s:%d: unknown geom type: %d",
+			lwerror("%s:%d: unsupported geom type: %s",
 				__FILE__, __LINE__,
-				TYPE_GETTYPE(lwgeom->type));
+				lwgeom_typename(TYPE_GETTYPE(lwgeom->type)));
 	}
 }



More information about the postgis-commits mailing list