Select to view content in your preferred language

Crash when inserting a row with the polylineZ

2580
0
07-31-2013 10:28 PM
ZbigniewKlimek
New Contributor
I'm experiencing crashes when inserting the row with the polyline for certain coordinates / coordinate system combination.

For example the coordinate system:

<WKT>PROJCS["GDA_1994_MGA_Zone_50",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137.0,298.2572221009113]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["false_easting",500000.0],PARAMETER["false_northing",10000000.0],PARAMETER["central_meridian",117.0],PARAMETER["scale_factor",0.9996],PARAMETER["latitude_of_origin",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",28350]]</WKT>
<WKID>28350</WKID>

and adding the line:

   Row row;
   table.CreateRowObject(row);

   row.SetString(L"aID", L"aaa");
   MultiPartShapeBuffer geom;
   geom.Setup(shapePolylineZ, 1, 2, 0); // shapeGeneralPolyline will work but it doesn't have a Z coordinates

   Point* points;
   geom.GetPoints(points);
   points[0].x = 333434.28587403544;
   points[0].y = 6254766.5315624271;
   points[1].x = 333439.26382052287;
   points[1].y = 6254767.0006559873;

   double *z;
   if (geom.GetZs(z) == 0)
   {
      z[0] = 287.004;
      z[1] = 278.3437;
   }


   geom.CalculateExtent();
   row.SetGeometry(geom);
   table.Insert(row);  // at this point will crash in   FileGDBAPID.dll!ShapeCompressor::CompressMultipart()  + 0x5e7 bytes

Note that the coordinates are valid for the defined coordinate system.

I must be missing something but I can't see what am I doing wrong.
Is there a way to make it work?
0 Kudos
0 Replies