On Sunday, 5 July 2020 18:42:43 BST Mark Goodge wrote: > On 05/07/2020 18:35, Robert Skedgell wrote: > > On 05/07/2020 17:58, Mark Goodge wrote: > >> Just out of interest, is there any simple way to export data from > >> GeoPackage (eg, to GML or GeoJSON) via the command line on Linux? I've > >> tried ogr2ogr, but that doesn't seem to recognise GeoPackage as a > >> source. I can do it manually by loading it into QGIS desktop and then > >> exporting it, but I'd prefer something I can automate. > > > > This worked for me to import a copy of the USRN GeoPackage file into my > > local OSM database: > > > > ogr2ogr -f PGDump -s_srs EPSG:27700 -t_srs EPSG:3857 \ > > osopenusrn_202007.sql osopenusrn_202007.gpkg > > > > Is it possible that your installation of GDAL doesn't include support > > for the GPKG vector driver? > > Yes, I get the error > > Unable to open datasource `osopenusrn_202007.gpkg' with the following > drivers > > followed by a list of drivers, and GPGK isn't one of them. But GDAL > seems to be up to date, so I'm not sure how to add it. > > Mark
You may have been caught by the current heavy development affecting GDAL and PROJ in the spatial field. The LTS releases of various linuxes are significantly behind on this, and the projects that use GDAL and PROJ as upstream are catching up slowly. There are major changes. My Ubuntu bionic (due for upgrade to Focal shortly) claims to have a current GDAL - using an ubuntigis unstable repo, but that's behind as well - I'm on GDAL 3.04 while upstream is 3.11. Paul Bivand _______________________________________________ Talk-GB mailing list Talk-GB@openstreetmap.org https://lists.openstreetmap.org/listinfo/talk-gb