I complied GDAL 3.0.1 from source with Python, SQLite, and SpatiLite
enabled. I am trying to dissolve polygons in a Shapefile with the
ogr2ogr output.shp input.shp -dialect sqlite -sql "SELECT
ST_Union(geometry) FROM input"
This works from the command line, but not as I would like from a
Python call to ogr2ogr.main, although other calls do work. I see from
the code that ogr2ogr.py does not support the dialect parameter, but
Is there a way for me to do this from Python without a system call?
Should I report this a bug/feature request to the GitHub repository?
For my own enlightenment, does anyone understand why this command
works from the command line?
> ogr2ogr.py is a toy / sample file which receives little maintainance, and was
> mostly a one-time port of the ogr2ogr.cpp source, which is the on used by the
> command line utility.
> You may use the 'librarified' ogr2ogr with the gdal.VectorTranslate() Python
> function. Examples at
> https://github.com/OSGeo/gdal/blob/master/autotest/utilities/ > test_ogr2ogr_lib.py#L63
> Spatialys - Geospatial professional services