[gdal-dev] forceToPoly causes crash when converting geom to json

Gane R gane.prog at gmail.com
Mon Nov 2 07:13:59 PST 2015


I am reading a file geodb and trying to convert multipolygon to Polygon
OGRGeometry *pGeom = NULL;
                            OGRGeometry *pForced = NULL;
                            pGeom = pOGRFeature->StealGeometry();
                            if(pGeom != NULL)
                            {
                                pForced =
OGRGeometryFactory::forceToPolygon(pGeom);
                                if(pForced != NULL)
                                {

pOGRFeature->SetGeometryDirectly(pForced);
                                }
                            }

char *pJsonString = pSrcGeom->exportToJson(); //Causes crash ...

Do any experience these ?
Gane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20151102/b7787346/attachment.html>


More information about the gdal-dev mailing list