<div dir="ltr" gmail_original="1">There's a new script for doing vector overlays called ogr_layer_algebra. You can try that <a href="https://mailtrack.io/trace/link/8844f1b0a00bc9c8c6b7d994f2ef6776bbbad413?w=Z2RhbC1kZXZAbGlzdHMub3NnZW8ub3Jn&url=https%3A%2F%2Fgdal.org%2Fprograms%2Fogr_layer_algebra.html&userId=8747767&signature=f3a663794cf05dc3">https://gdal.org/programs/ogr_layer_algebra.html</a><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr">---<div>Ujaval Gandhi</div><div>Spatial Thoughts</div><div><a href="https://mailtrack.io/trace/link/4ddad0f9cf2b5c3c4c75c835dbf4a885ea30591b?w=Z2RhbC1kZXZAbGlzdHMub3NnZW8ub3Jn&url=http%3A%2F%2Fwww.spatialthoughts.com&userId=8747767&signature=de7d85fbbe1e0bcd" target="_blank">www.spatialthoughts.com</a></div><div><br></div></div></div></div><br></div><br><img width="0" height="0" class="mailtrack-img" alt="" style="display:flex" src="https://mailtrack.io/trace/mail/w/Z2RhbC1kZXZAbGlzdHMub3NnZW8ub3Jn/9e2de49f7cb6fa8c4f18f1dec82649cf652c84f4.png?u=8747767" ><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 10, 2023 at 1:26 PM Devdatta Tengshe <devdatta@tengshe.in> wrote:<br></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><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" target="_blank">https://gis.stackexchange.com/<wbr>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"><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>
______________________________<wbr>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/gdal-dev</a><br>
</blockquote></div>