<div dir="ltr"><div dir="ltr"><div><div>I have a shapefile with lines, and another with polygons. I want to generate an output of those lines that are not covered by any polygon.</div><div><br></div><div>I can perfectly do this in QGIS's Difference tool, but want to do it with og2ogr. (since it will be a part of a cronjob)</div><div><br></div><div>I tried to do it, using the following command:</div><div>`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"`</div><div><br></div><div>But it just generated a .dbf file.</div><div><br></div><div>This behavior has also been reported here: <a href="https://gis.stackexchange.com/a/324837/442">https://gis.stackexchange.com/a/324837/442</a></div></div><div><br></div><div>Is this a bug, or expected behavior? Is there a better way to achieve what I want to?</div><div><br></div><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font color="#999999" size="2">Regards,</font><div><font size="2" color="#444444">Devdatta</font></div></div></div></div></div></div></div></div>