2

I'm trying to do the same as the ogr2ogr example given by https://gis.stackexchange.com/a/119404/6458

The difference is that my inputs are a GML and a shapefile. Export.shp should only contain the data in input.gml intersecting with buffer.shp. I don't receive an error, but I also don't get an output:

ogr2ogr -f "ESRI Shapefile" -sql "CREATE VIRTUAL TABLE Buffer USING VirtualOGR('buffer.shp',
0, 'buffer');SELECT ST_Intersection(A.geometry, B.geometry) AS geometry, A.*, B.* FROM
Layername A, Buffer B WHERE ST_Intersects(A.geometry, B.geometry)" -dialect SQLITE export.shp
input.gml

'Layername' here in the SQL refers to the layer name in the input.gml

Does anyone have an idea of what is going wrong?

  • I still don't know how to get this working, but it doesn't have a high priority for me anymore. In the meantime I broke it up in two: first export GML to shapefile, then perform the intersection on this shapefile. – joosthoek Jul 22 '15 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.