Ahmet, use the OGRGeometryFactory::forceTo(geom, wkbGeometrycollection) method:
https://gdal.org/api/ogrgeometry_cpp.html#classOGRGeometryFactory_1a26120382ccfec8ac4b5f932dd3a67c5f Even Le 13/06/2021 à 20:45, Ahmet Temiz a écrit :
Hi, I exported the geometry to geojson as: OGRMultiPolygon * poOGRMultiPolygon= (OGRMultiPolygon * ) unionCascaded; // char * pszJSon= poOGRMultiPolygon->exportToJson(); this generates: "type": "MultiPolygon", "coordinates": .... But. I need geometrycollection. How can I do that? regards -- Ahmet Temiz Jeoloji Müh. Afet ve Acil Durum Yönetimi Başkanlığı Deprem Dairesi Başkanlığı ________________________ Ahmet Temiz Geological Eng. Disaster and Emergency Management of Presidency _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
-- http://www.spatialys.com My software is free, but my time generally not.
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev