[postgis-commits] svn - r3272 - branches/1.3/lwgeom

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Fri Nov 7 05:18:12 PST 2008


Author: mcayland
Date: 2008-11-07 05:18:11 -0800 (Fri, 07 Nov 2008)
New Revision: 3272

Modified:
   branches/1.3/lwgeom/liblwgeom.h
   branches/1.3/lwgeom/lwgeom.c
   branches/1.3/lwgeom/lwgeom_api.c
Log:
Undo commits 3270 & 3271. It has been discovered the lwgeom_inspected_* routines correctly inspect CURVEPOLYGONs implicitly, and so it's just the curve types that need fixing.


Modified: branches/1.3/lwgeom/liblwgeom.h
===================================================================
--- branches/1.3/lwgeom/liblwgeom.h	2008-11-07 12:57:04 UTC (rev 3271)
+++ branches/1.3/lwgeom/liblwgeom.h	2008-11-07 13:18:11 UTC (rev 3272)
@@ -1198,12 +1198,7 @@
 extern void pfree_curve(LWCURVE  *curve);
 LWCURVE *lwcurve_clone(const LWCURVE *curve);
 LWCURVE *lwgeom_getcurve_inspected(LWGEOM_INSPECTED *inspected, int geom_number);
-LWCURVEPOLY *lwgeom_getcurvepoly_inspected(LWGEOM_INSPECTED *inspected, int geom_number);
 
-/* Cast functions */
-LWCURVE *lwgeom_as_lwcurve(LWGEOM *lwgeom);
-LWGEOM *lwcurve_as_lwgeom(LWPOINT *obj);
-
 /******************************************************************
  * LWMULTIx and LWCOLLECTION functions
  ******************************************************************/

Modified: branches/1.3/lwgeom/lwgeom.c
===================================================================
--- branches/1.3/lwgeom/lwgeom.c	2008-11-07 12:57:04 UTC (rev 3271)
+++ branches/1.3/lwgeom/lwgeom.c	2008-11-07 13:18:11 UTC (rev 3272)
@@ -332,7 +332,6 @@
 LWGEOM *lwpoly_as_lwgeom(LWPOLY *obj) { return (LWGEOM *)obj; }
 LWGEOM *lwline_as_lwgeom(LWLINE *obj) { return (LWGEOM *)obj; }
 LWGEOM *lwpoint_as_lwgeom(LWPOINT *obj) { return (LWGEOM *)obj; }
-LWGEOM *lwcurve_as_lwgeom(LWPOINT *obj) { return (LWGEOM *)obj; }
 
 void
 lwgeom_release(LWGEOM *lwgeom)

Modified: branches/1.3/lwgeom/lwgeom_api.c
===================================================================
--- branches/1.3/lwgeom/lwgeom_api.c	2008-11-07 12:57:04 UTC (rev 3271)
+++ branches/1.3/lwgeom/lwgeom_api.c	2008-11-07 13:18:11 UTC (rev 3272)
@@ -1210,30 +1210,8 @@
 
 /*
  * 1st geometry has geom_number = 0
- * if the actual geometry isnt a CURVEPOLYGON, null is returned (see _gettype()).
  * if there arent enough geometries, return null.
- * this is fine to call on a curvepolygon 
  */
-LWCURVEPOLY *
-lwgeom_getcurvepoly_inspected(LWGEOM_INSPECTED *inspected, int geom_number)
-{
-	uchar *sub_geom;
-	uchar type;
-
-	sub_geom = lwgeom_getsubgeometry_inspected(inspected, geom_number);
-
-	if (sub_geom == NULL) return NULL;
-
-	type = lwgeom_getType(sub_geom[0]);
-	if (type != CURVEPOLYTYPE) return NULL;
-
-	return lwcurvepoly_deserialize(sub_geom);
-}
-
-/*
- * 1st geometry has geom_number = 0
- * if there arent enough geometries, return null.
- */
 LWGEOM *lwgeom_getgeom_inspected(LWGEOM_INSPECTED *inspected, int geom_number)
 {
 	uchar *sub_geom;



More information about the postgis-commits mailing list