[fdo-commits] r156 - branches/3.2.x/Providers/ArcSDE/Src/Provider

svn_fdo at osgeo.org svn_fdo at osgeo.org
Thu Mar 15 10:20:57 EDT 2007


Author: jacklee
Date: 2007-03-15 10:20:55 -0400 (Thu, 15 Mar 2007)
New Revision: 156

Modified:
   branches/3.2.x/Providers/ArcSDE/Src/Provider/ArcSDEUtils.cpp
Log:
Call SETUP_BUFFERS just before SE_shape_generate* since the buffers might be re-allocated.

Modified: branches/3.2.x/Providers/ArcSDE/Src/Provider/ArcSDEUtils.cpp
===================================================================
--- branches/3.2.x/Providers/ArcSDE/Src/Provider/ArcSDEUtils.cpp	2007-03-15 13:18:20 UTC (rev 155)
+++ branches/3.2.x/Providers/ArcSDE/Src/Provider/ArcSDEUtils.cpp	2007-03-15 14:20:55 UTC (rev 156)
@@ -794,8 +794,6 @@
             work_shape = &result_shape;
         }
 
-		SETUP_BUFFERS(connection->mGeomBuffer_pointsZ, connection->mGeomBuffer_pointsM);
-
         // Convert FdoIGeometry to SE_SHAPE:
         switch (geom->GetDerivedType())
         {
@@ -850,6 +848,7 @@
                 }
 
                 // Populate the SE_SHAPE based on the XY,Z, and M arrays:
+			    SETUP_BUFFERS(connection->mGeomBuffer_pointsZ, connection->mGeomBuffer_pointsM);
                 lResult = SE_shape_generate_point (totalNumPoints, connection->mGeomBuffer_pointsXY, zBuffer, mBuffer, *work_shape);
                 handle_sde_err<FdoCommandException>(connection->GetConnection(), lResult, __FILE__, __LINE__, ARCSDE_CONVERT_SHAPE_FAILED, "Failed to convert FGF geometry to ArcSDE shape.");
             }
@@ -871,7 +870,6 @@
                     RESIZE(connection->mGeomBuffer_pointsM, double*, totalNumPoints * sizeof(double));
                 }
 
-
                 // Populate arrays for XY, Z and M (as required):
                 for (FdoInt32 i=0; i<totalNumPoints; i++)
                 {
@@ -883,6 +881,7 @@
                 }
 
                 // Populate the SE_SHAPE based on the XY,Z, and M arrays:
+  				SETUP_BUFFERS(connection->mGeomBuffer_pointsZ, connection->mGeomBuffer_pointsM);
                 lResult = SE_shape_generate_line (totalNumPoints, 1, NULL, connection->mGeomBuffer_pointsXY, zBuffer, mBuffer, *work_shape);
                 handle_sde_err<FdoCommandException>(connection->GetConnection(), lResult, __FILE__, __LINE__, ARCSDE_CONVERT_SHAPE_FAILED, "Failed to convert FGF geometry to ArcSDE shape.");
             }
@@ -936,6 +935,7 @@
                 }
 
                 // Populate the SE_SHAPE based on the XY,Z, and M arrays:
+				SETUP_BUFFERS(connection->mGeomBuffer_pointsZ, connection->mGeomBuffer_pointsM);
                 lResult = SE_shape_generate_line (totalNumPoints, numLineStrings, connection->mGeomBuffer_offsets, connection->mGeomBuffer_pointsXY, zBuffer, mBuffer, *work_shape);
                 handle_sde_err<FdoCommandException>(connection->GetConnection(), lResult, __FILE__, __LINE__, ARCSDE_CONVERT_SHAPE_FAILED, "Failed to convert FGF geometry to ArcSDE shape.");
             }
@@ -1000,6 +1000,7 @@
                 }
 
                 // Populate the SE_SHAPE based on the XY,Z, and M arrays:
+				SETUP_BUFFERS(connection->mGeomBuffer_pointsZ, connection->mGeomBuffer_pointsM);
                 lResult = SE_shape_generate_polygon (totalNumPoints, 1, NULL, connection->mGeomBuffer_pointsXY, zBuffer, mBuffer, *work_shape);
                 handle_sde_err<FdoCommandException>(connection->GetConnection(), lResult, __FILE__, __LINE__, ARCSDE_CONVERT_SHAPE_FAILED, "Failed to convert FGF geometry to ArcSDE shape.");
             }
@@ -1081,6 +1082,7 @@
                 }
 
                 // Populate the SE_SHAPE based on the XY,Z, and M arrays:
+				SETUP_BUFFERS(connection->mGeomBuffer_pointsZ, connection->mGeomBuffer_pointsM);
                 lResult = SE_shape_generate_polygon (totalNumPoints, numPolygons, connection->mGeomBuffer_offsets, connection->mGeomBuffer_pointsXY, zBuffer, mBuffer, *work_shape);
                 handle_sde_err<FdoCommandException>(connection->GetConnection(), lResult, __FILE__, __LINE__, ARCSDE_CONVERT_SHAPE_FAILED, "Failed to convert FGF geometry to ArcSDE shape.");
             }



More information about the fdo-commits mailing list