Re: [gdal-dev] Can't create feature on layer for polygon

2012-10-22 Thread Hugo Benicio
For anyone else having the same problem like mine, I solved my issue just iterating over the wkbGeometryCollection, gathering all polygons in it and creating a feature for the my layer for each of them. On Mon, Oct 22, 2012 at 1:31 PM, Hugo Benicio wrote: > Ok, I've discovered that myPolygon has

Re: [gdal-dev] Can't create feature on layer for polygon

2012-10-22 Thread Hugo Benicio
Ok, I've discovered that myPolygon has geometryType *wkbGeometryCollection.* When I try to: newDataSource->CreateLayer("test",NULL, *wkbGeometryCollection*, NULL); it fails and returns NULL. So my question now is: How do I create a wkbGeometryCollection layer (if possible) or how do I correctl

[gdal-dev] Can't create feature on layer for polygon

2012-10-22 Thread Hugo Benicio
Hi guys! I'm trying to create a shapefile containing a single polygon, but unfortunately I'm facing an error that I have no clue how to solve. I'm successfuly creating a datasource and a layer with: OGRLayer* testLayer = newDataSource->CreateLayer("test",NULL, wkbPolygon, NULL); Then when I try