I’m trying to do a simple difference between two polygons using ogr, but I can’t make it work. The input layers have the same CRS. The input polygon is a multipolygon, and the overlay polygon is the result of merged polygons.
I’m using this code:
ogr2ogr diff8.shp project_landuse.shp -dialect sqlite -sql "SELECT ST_Difference(project_landuse.Geometry, 'merge_terrain_dissolve.Geometry) AS Geometry FROM project_landuse a LEFT JOIN 'merge_terrain_dissolve.shp'.'merge_terrain_dissolve' b
The result looks like this:
And should look like this: