Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 11631

How to combine multiple geopackages into one single file

$
0
0

I have got a series of geopackages which represent every single packet of land across England. Each geopackage is one local area and i want to combine them to create one single file for all of england.

Each geopackage is between 50 and 1500 MB and there are ~300 of them

I would like to combine the to create one single MSSQL Spatial

I think that ogr2ogr is a best bet for this, but I am having a little trouble

I have tried this code below as a .bat, which i confess i'm not that familiar with and has been copied from a previous colleague who is no longer available

set "MSSQLSPATIAL_USE_GEOMETRY_COLUMNS=NO"ogr2ogr -f "MSSQLSpatial" "MSSQL:server=x;database=y;trusted_connection=yes" "File1.gpkg" -update -append -nln "SQLTableName" -gt 1000 -t_srs "EPSG:27700" -s_srs "EPSG:27700"for %%a in ("Folder\*.gpkg") Do (ogr2ogr -f "MSSQLSpatial" "MSSQL:server=x;database=y;trusted_connection=yes" "%%a" -update -append -nln "SQLTableName" -gt 100000 -t_srs "EPSG:27700" -s_srs "EPSG:27700")

But this creates the table in SQL but doesnt fill it with any data

The gpkg are all fine as I can open them in GIS and see the content is all there


Viewing all articles
Browse latest Browse all 11631

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>