I am trying to create an intersection between two different layers of two different geodatabases using ogr2ogr, but without success.
I have been using the following command line prompt:
ogr2ogr.exe intersection.shp .\Sea.gdb .\Roads.gdb -dialect sqlite -sql "SELECT ST_INTERSECTION(Sea_Depth.geometry,Roads_100m.geometry) as geometry FROM Sea a,Roads b"
But I get the error:
Warning 1: layer names ignored in combination with -sql. ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(SELECT ST_INTERSECTION(Sea_Depths.geometry, Roads_100m.geometry) as geometry FROM Sea a,Roads b): no such table: Sea
For ease of context, the sea layer is made of polygons and the road layer is lines. Intersection.shp will ideally be the resulting file.