Re: [gdal-dev] Convert OGRGeometry* to pointer to derived geometry type

2021-08-14 Thread Even Rouault
Brook, to methods can still be used. We just have restricted invalid conversions, like a LineString to Polygon A great part of what is valid is tested in https://github.com/OSGeo/gdal/blob/1ec0b63d8820b2d3f0cfb792e05f3f5fea49892c/autotest/cpp/test_ogr.cpp#L787 Even Le 14/08/2021 à

[gdal-dev] Convert OGRGeometry* to pointer to derived geometry type

2021-08-13 Thread Brook Milligan
I would like to convert a pointer to OGRGeometry into a pointer to the appropriate derived type based upon the result of wkbFlatten(geometry->getGeometryType()). It used to be possible to do this with functions like geometry->toLineString(). However, it seems that those are all deleted with