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

2015-11-02 Thread Ari Jolma
No problems at least on the other side of bindings: my $g = Geo::OGR::Geometry->new( WKT=>'MULTIPOLYGON(((1 1,5 1,5 5,1 5,1 1),(2 2, 3 2, 3 3, 2 3,2 2)),((3 3,6 2,6 4,3 3)))'); my $h = $g->ForceToPolygon; say $h->AsText; say $h->As(Format=>'GeoJSON'); output: POLYGON ((1 1,5 1,5 5,1 5,1

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

2015-11-02 Thread Gane R
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) {