[mapserver-commits] r7238 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Jan 3 08:48:12 EST 2008


Author: tomkralidis
Date: 2008-01-03 08:48:11 -0500 (Thu, 03 Jan 2008)
New Revision: 7238

Modified:
   trunk/mapserver/mapgeos.c
Log:
use msComputeBounds() instead, since it's
already in the codebase (#2087)


Modified: trunk/mapserver/mapgeos.c
===================================================================
--- trunk/mapserver/mapgeos.c	2008-01-02 22:41:40 UTC (rev 7237)
+++ trunk/mapserver/mapgeos.c	2008-01-03 13:48:11 UTC (rev 7238)
@@ -65,29 +65,6 @@
 }
 
 /*
-** utility functions
-*/
-
-/*
-** msGEOSEnvelope: utility function to derive the envelope
-of a GEOSGeom and set shapeObj.bounds
-*/
-static void msGEOSEnvelope(GEOSGeom g, shapeObj *shape)
-{
-  GEOSCoordSeq coords;
-  GEOSGeom ring;
-  GEOSGeom envelope;
-
-  envelope = (GEOSGeom) GEOSEnvelope(g);
-  ring = (GEOSGeom) GEOSGetExteriorRing(envelope);
-  coords = (GEOSCoordSeq) GEOSGeom_getCoordSeq(ring);
-  GEOSCoordSeq_getX(coords, 0, &(shape->bounds.minx));
-  GEOSCoordSeq_getY(coords, 0, &(shape->bounds.miny));
-  GEOSCoordSeq_getX(coords, 2, &(shape->bounds.maxx));
-  GEOSCoordSeq_getY(coords, 2, &(shape->bounds.maxy));
-}
-
-/*
 ** Translation functions
 */
 static GEOSGeom msGEOSShape2Geometry_point(pointObj *point)
@@ -362,8 +339,8 @@
     GEOSCoordSeq_getY(coords, 0, &(shape->line[0].point[i].y));
     /* GEOSCoordSeq_getZ(coords, 0, &(shape->line[0].point[i].z)); */
   }
-  
-  msGEOSEnvelope(g, shape);
+ 
+  msComputeBounds(shape); 
 
   return shape;
 }
@@ -396,7 +373,7 @@
     /* GEOSCoordSeq_getZ(coords, i, &(shape->line[0].point[i].z)); */
   }
 
-  msGEOSEnvelope(g, shape);
+  msComputeBounds(shape); 
 
   return shape;
 }
@@ -437,7 +414,7 @@
     msAddLineDirectly(shape, &line);
   }
 
-  msGEOSEnvelope(g, shape);
+  msComputeBounds(shape); 
 
   return shape;
 }
@@ -494,7 +471,7 @@
     msAddLineDirectly(shape, &line);
   }
 
-  msGEOSEnvelope(g, shape);
+  msComputeBounds(shape); 
 
   return shape;
 }
@@ -557,7 +534,7 @@
     }
   } /* next polygon */
 
-  msGEOSEnvelope(g, shape);
+  msComputeBounds(shape); 
 
   return shape; 
 }



More information about the mapserver-commits mailing list