Srgcreate.exe possible to import GPKG?


I used old spatial allocator srgcreate.exe. But I met some problem. Because my vector data is too large (>2 GB), I cannot export my vector data to esri shapefile. I was able to export my vector data to geopackage (.gpkg). But when I run the script

setenv WEIGHT_FILE_NAME $DATA/shapefiles/SouthKorea2018/320.gpkg
setenv WEIGHT_FILE_NAME $DATA/shapefiles/SouthKorea2018/320

an error message is occured:

ERROR in /work/gwangjin/local/Spatial-Allocator/bin/64bits/srgcreate.exe: Unable to open shape file:/work/gwangjin/local/Spatial-Allocator/data/shapefiles/SouthKorea2018/320.gpkg (WEIGHT_FILE_NAME). Exiting…

Should I use recent pg_srgtools?

The older Spatial Allocator surrogate creation tools have some trouble with larger data and I don’t believe they support the geopackage format.

You can try the newer SurrogateToolsDB which handle larger datasets better.

Since your weight file is larger than 2 GB and can’t be stored in a Shapefile, you might research how to load the data into PostGIS.

But once it is in there, I think the newer surrogate tools should work. If not, please write again.

1 Like