[gdal-dev] How to append to all layers with ogr2ogr?

Even Rouault even.rouault at spatialys.com
Mon Feb 1 05:19:58 PST 2016


Jukka,

> 
> I would like to collect data from a bunch of GML files into one GeoPackage
> but GML files may contain more than 20 layers and ogr2ogr does not want to
> append data for me because the -append switch probably has an effect only
> to one explicitly given layer.

-append is supposed to work with several layers too.

I've just downloaded 
http://kartat.kapsi.fi/files/maastotietokanta/kaikki/etrs89/gml/K2/K24/K2433L_mtk.zip 
and tried your below command, both a non inexisting mtk.gpkg, and one created 
with it, and it works as expected for me.

Perhaps the bug only triggers with some initial content of mtk.gpkg ?

> 
> ogr2ogr -f gpkg -update -append mtk.gpkg /vsizip/K2433L_mtk.zip

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list