[mapserver-commits] r9457 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Oct 14 13:49:19 EDT 2009


Author: aboudreault
Date: 2009-10-14 13:49:18 -0400 (Wed, 14 Oct 2009)
New Revision: 9457

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/maporaclespatial.c
Log:
Fixed CurvePolygons from oracle not drawn (#2772)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-10-14 16:38:07 UTC (rev 9456)
+++ trunk/mapserver/HISTORY.TXT	2009-10-14 17:49:18 UTC (rev 9457)
@@ -15,6 +15,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Fixed CurvePolygons from oracle not drawn (#2772)
+
 - Fixed raster queries (broken by RFC 52 changes) (#3166)
 
 - Fixed coordinate projection problem in some cases with WMS GetFeatureInfo

Modified: trunk/mapserver/maporaclespatial.c
===================================================================
--- trunk/mapserver/maporaclespatial.c	2009-10-14 16:38:07 UTC (rev 9456)
+++ trunk/mapserver/maporaclespatial.c	2009-10-14 17:49:18 UTC (rev 9457)
@@ -201,7 +201,7 @@
 static void osClosedPolygon(msOracleSpatialHandler *hand, shapeObj *shape, SDOGeometryObj *obj, int start, int end, lineObj points, int elem_type, int data3d, int data4d);
 static void osRectangle(msOracleSpatialHandler *hand, shapeObj *shape, SDOGeometryObj *obj, int start, int end, lineObj points, pointObj *pnt, int data3d, int data4d);
 static void osCircle(msOracleSpatialHandler *hand, shapeObj *shape, SDOGeometryObj *obj, int start, int end, lineObj points, pointObj *pnt, int data3d, int data4d);
-static void osArcPolygon(msOracleSpatialHandler *hand, shapeObj *shape, SDOGeometryObj *obj, int start, int end, lineObj arcpoints, int data3d, int data4d);
+static void osArcPolygon(msOracleSpatialHandler *hand, shapeObj *shape, SDOGeometryObj *obj, int start, int end, lineObj arcpoints,int elem_type,int data3d, int data4d); 
 static int osGetOrdinates(msOracleSpatialDataHandler *dthand, msOracleSpatialHandler *hand, shapeObj *shape, SDOGeometryObj *obj, SDOGeometryInd *ind);
 static int osCheck2DGtype(int pIntGtype);
 static int osCheck3DGtype(int pIntGtype);
@@ -1444,7 +1444,7 @@
     }
 }
 
-static void osArcPolygon(msOracleSpatialHandler *hand, shapeObj *shape, SDOGeometryObj *obj, int start, int end, lineObj arcpoints, int data3d, int data4d)
+static void osArcPolygon(msOracleSpatialHandler *hand, shapeObj *shape, SDOGeometryObj *obj, int start, int end, lineObj arcpoints, int elem_type, int data3d, int data4d)
 {
     int n, i;
     lineObj points = {0, NULL};
@@ -1461,7 +1461,7 @@
 
     if (n > 2)
     {
-        shape->type = MS_SHAPE_LINE;
+        shape->type = (elem_type==32) ? MS_SHAPE_POLYGON : MS_SHAPE_LINE; 
         points.numpoints = n;
 
         for (i = 0; i < n-2; i = i+2)
@@ -1664,13 +1664,16 @@
                       break;
                   case 22: /* compound type */
                       if (compound_type)
-                          osArcPolygon(hand, &newshape, obj, ord_start, (compound_count<compound_lenght)?ord_end+2:ord_end , points, data3d, data4d);
+                          osArcPolygon(hand, &newshape, obj, ord_start, (compound_count<compound_lenght)?ord_end+2:ord_end , points, elem_type, data3d, data4d); 
                       else
-                          osArcPolygon(hand, shape, obj, ord_start, ord_end, points, data3d, data4d);
+                          osArcPolygon(hand, shape, obj, ord_start, ord_end, points, elem_type, data3d, data4d); 
                       break;
                   case 31: /* simple polygon with n points, last point equals the first one */
                       osClosedPolygon(hand, shape, obj, ord_start, ord_end, points, elem_type, data3d, data4d);
                       break;
+                  case 32: /* Polygon with arcs */ 
+                      osArcPolygon(hand, shape, obj, ord_start, ord_end, points, elem_type, data3d, data4d); 
+                      break;
                   case 33: /* rectangle defined by 2 points */
                       osRectangle(hand, shape, obj, ord_start, ord_end, points, point5, data3d, data4d);
                       break;



More information about the mapserver-commits mailing list