I have a directory of GeoJSON files, which I want to load as layers into a single new GeoPackage file. According to the GDAL GeoPackage documentation, I can name my destination GeoPackage file, enter a directory of shapefiles as the source, and it will load them each as their own layer/table. Indeed, I've tested this with shapefiles, and it works.
When I try the same thing with GeoJSON files, however, I get this:
Unable to open datasource ./seattle_washington_osm with the following drivers.
…
-> GeoJSON
…
Is this simply not possible with GeoJSON files, or am I doing something wrong?
Best Answer
The "directory as dataset" is a specific feature of the shapefile driver. From http://www.gdal.org/drv_shapefile.html :
Alternative approaches would be to load each file using a loop, or to convert to shapefiles first.