[mapserver-commits] r11747 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Sun May 22 16:23:34 EDT 2011


Author: rouault
Date: 2011-05-22 13:23:34 -0700 (Sun, 22 May 2011)
New Revision: 11747

Modified:
   trunk/mapserver/mapogr.cpp
Log:
ogrGeomLine(): use OGR_G_GetPoints() when GDAL_VERSION_NUM >= 1900

Modified: trunk/mapserver/mapogr.cpp
===================================================================
--- trunk/mapserver/mapogr.cpp	2011-05-22 19:13:33 UTC (rev 11746)
+++ trunk/mapserver/mapogr.cpp	2011-05-22 20:23:34 UTC (rev 11747)
@@ -327,10 +327,22 @@
           return(-1);
       }
 
+#if GDAL_VERSION_NUM >= 1900
+      OGR_G_GetPoints(hGeom,
+                      &(line.point[0].x), sizeof(pointObj),
+                      &(line.point[0].y), sizeof(pointObj),
+                      NULL, 0);
+#endif
+
       for(j=0; j<numpoints; j++)
       {
-          dX = line.point[j].x = OGR_G_GetX( hGeom, j); 
+#if GDAL_VERSION_NUM < 1900
+          dX = line.point[j].x = OGR_G_GetX( hGeom, j);
           dY = line.point[j].y = OGR_G_GetY( hGeom, j);
+#else
+          dX = line.point[j].x;
+          dY = line.point[j].y;
+#endif
 
           /* Keep track of shape bounds */
           if (j == 0 && outshp->numlines == 0)



More information about the mapserver-commits mailing list