I have shapefile with lines, and another with polygons. I want to generate an output of those lines that are not covered by any polygon.
I can perfectly do this in QGIS's Difference tool, but want to do it with og2ogr.
I tried to do it, using the following command:
ogr2ogr -overwrite out.shp line.shp -dialect SQLite -sql "select st_difference(a.geometry, b.geometry) as geometry from line as a, 'polygon.shp'.polygon as b"
But it just generated a .dbf file.
This behaviour has also been reported here: https://gis.stackexchange.com/a/324837/442