Brook,

toXXXX 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 à 02:23, Brook Milligan a écrit :
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 the OGR_FORBID_DOWNCAST_TO(name) 
macro, although the functions are listed in the API documentation.

How is this conversion supposed to be accomplished now?

Thanks for any pointers.

Cheers,
Brook

_______________________________________________
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

Reply via email to