I'm struggling to use ogr2ogr to convert a GML file into a GeoJSON file. My input is zipped GML files with several layers. I'm only interested in the layer with name 'TopographicArea'.
I've tried converting using the following at the command line:
ogr2ogr -f GeoJSON .\3925845-HW5929.geo.json .\3925845-HW5929.gz
This fails with the error:
ERROR 1: Layer 'TopographicPoint' does not already exist in the output dataset, and cannot be created by the output driver.
I'm presuming this is because GeoJSON doesn't support layers.
How can I tell ogr2ogr to ignore all layers except one?
P.S. I have thousands of GML files to process, so this needs to be scriptable.