I usually peruse the ogr2ogr.py source for hints maybe this helps https://github.com/OSGeo/gdal/blob/master/gdal/swig/python/samples/ogr2ogr.py#L1512
> On Dec 10, 2020, at 3:39 AM, Martin Landa <[email protected]> wrote: > > Hi, > > is there a way to apply PROMOTE_TO_MULTI in Python API? I am trying to > write a sample script for students in Python which converts SHP file > to PostGIS layers. I am dealing with a well known problem "Geometry > type (MultiXXX) does not match column type (XXX)". > > How to solve it properly in order to avoid calling `ogr2ogr` from > Python code? :-) > > Thanks, Martin > > -- > Martin Landa > http://geo.fsv.cvut.cz/gwiki/Landa > http://gismentors.cz/mentors/landa > _______________________________________________ > gdal-dev mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/gdal-dev > _______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
