Re: [gdal-dev] addRingDirectly is crashed

2020-04-18 Thread Even Rouault
> Your point ordering is counter clockwise. That's not relevant. GDAL doesn't care. Some formats do (shapefile), but GDAL will fix winding order at the driver level. At the API level, users are free to use whatever order they want. >Also, I think you need to set the spatial reference of the r

Re: [gdal-dev] addRingDirectly is crashed

2020-04-18 Thread Martin Chapman
Your point ordering is counter clockwise. Did you intend to add a hole? I think exterior rings must be clockwise. Also, I think you need to set the spatial reference of the ring. Best regards, Martin Chapman > On Apr 18, 2020, at 7:15 AM, Andrew C Aitchison > wrote: > > On Sat, 18 Apr 2

Re: [gdal-dev] addRingDirectly is crashed

2020-04-18 Thread Andrew C Aitchison
On Sat, 18 Apr 2020, Ahmet Temiz wrote: Hi, What am I doing wrong? addRingDirectly is crashed f( poGeometry != NULL && wkbFlatten(poGeometry->getGeometryType()) == wkbPolygon ) { OGRPolygon *poPolygon = (OGRPolygon *) poGeometry; // Box,

[gdal-dev] addRingDirectly is crashed

2020-04-18 Thread Ahmet Temiz
Hi, What am I doing wrong? addRingDirectly is crashed f( poGeometry != NULL && wkbFlatten(poGeometry->getGeometryType()) == wkbPolygon ) { OGRPolygon *poPolygon = (OGRPolygon *) poGeometry; // Box, OGRLinearRing * poLinearRing {};