gdal
gdal copied to clipboard
gdal vector pipeline: warn if no features were written
Feature description
If the GML driver is not available, the following command happily writes an empty file with no warning:
gdal vector pipeline \
! read WFS:"https://data.geopf.fr/wfs/ows?version=2.0.0&typename=ADMINEXPRESS-COG.2017:commune" \
! filter --where "insee_com='90065'" \
! write --output-layer=commune commune.fgb
Additional context
No response
Was it totally empty, or with a schema but without any features? The latter case would be similar to the result from
ogr2ogr empty.fgb input.gpkg -sql "select * from input where 1=2"
Yes, I get a schema with no features.
I'm wondering if we should warn. There are probably use cases where an empty layer is expected. (and I'm aware of some GDAL (API) users fail on GDAL warnings, although I wouldn't recommend doing that)