[gdal-dev] OGRGeometry -> OGRGeometryCollection

Florian Lohoff f at zz.de
Thu Apr 12 04:25:46 PDT 2018


Hi,

i am Intersecting to MultiPolygons and get a OGRGeometry which sometimes
contains a OGRGeometryCollection depending on the complexity of the
overlap. Now i'd like to iterate over the Geometries in the collection
but the OGRGeometry Class does not have the ->removeGeometry or
->getGeometryRef so i'd need to cast the OGRGeometry to a
OGRGeometryCollection. I saw that gdal 2.3 does have a
->toGeometryCollection but i am on Debian/Stretch which has gdal 2.1 
so i am lost on how to extract the geometries of the GeometryCollection
in an OGRGeometry object.

Flo
-- 
Florian Lohoff                                                 f at zz.de
             UTF-8 Test: The 🐈 ran after a 🐁, but the 🐁 ran away
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180412/43330196/attachment.sig>


More information about the gdal-dev mailing list