[gdal-dev] promote_to_multi and python API
Even Rouault
even.rouault at spatialys.com
Thu Dec 10 05:11:09 PST 2020
Martin,
>
> <kai.muehlbauer at uni-bonn.de> napsal:
> > not sure if this helps you, but "PROMOTE_TO_MULTI" can be added as
> > option with several OGR functions with the Python API (eg. Intersection,
> > Update, Identity etc.).
>
> yes, thanks for pointing this out. But it seems to be not possible for
> CopyLayer() which is the problem in my case.
CopyLayer() is for simple/straightforward conversions. For more advanced
options, use gdal.VectorTranslate(), the API version of ogr2ogr
(Or you could do the hwole process at hand, and use the
Geometry.ForceTo(geom_type) API, but you'll likey be much happier using
gdal.VectorTranslate())
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list