Open mdsumner opened 1 year ago
it's all stored here now:
https://github.com/wmgeolab/geoBoundaries
https://github.com/wmgeolab/geoBoundaries/blob/main/releaseData/geoBoundariesOpen-meta.csv
older versions get renamed to geoBoundariesArchive_4_0_0 etc.
ogrinfo /vsizip//vsicurl/https://github.com/wmgeolab/geoBoundaries/raw/main/releaseData/gbOpen/SWE/ADM1/geoBoundaries-SWE-ADM1-all.zip/geoBoundaries-SWE-ADM1_simplified.geojson
ogrinfo /vsizip//vsicurl/https://github.com/wmgeolab/geoBoundaries/raw/main/releaseData/gbOpen/SWE/ADM1/geoBoundaries-SWE-ADM1-all.zip/geoBoundaries-SWE-ADM1_simplified.topojson
INFO: Open of `/vsizip//vsicurl/https://github.com/wmgeolab/geoBoundaries/raw/main/releaseData/gbOpen/SWE/ADM1/geoBoundaries-SWE-ADM1-all.zip/geoBoundaries-SWE-ADM1_simplified.topojson'
using driver `TopoJSON' successful.
1: SWEADM1gbOpen
Instead of getting the whole zip file just for specific files you can also access the files directly:
/vsicurl/https://github.com/wmgeolab/geoBoundaries/raw/main/releaseData/gbOpen/SWE/ADM1/geoBoundaries-SWE-ADM1.topojson
ogrinfo /vsicurl/https://github.com/wmgeolab/geoBoundaries/raw/main/releaseData/gbOpen/SWE/ADM1/geoBoundaries-SWE-ADM1_simplified.topojson
INFO: Open of `/vsicurl/https://github.com/wmgeolab/geoBoundaries/raw/main/releaseData/gbOpen/SWE/ADM1/geoBoundaries-SWE-ADM1_simplified.topojson'
using driver `TopoJSON' successful.
1: SWEADM1gbOpen
And I would always prioritize topojson support over geojson because the files are smaller and earlier in processing
good point
it doesn't get the whole zip file though, and it might actually be better to stream from compressed - I'm still exploring, but afaict it's way faster to use the shapefile via the zip - sometimes text is too big
interesting! I wish geoBoundaries would offer FlatGeobuf, although FGB doesn't have built-in compression support.
It's also strange that GitHub doesn't serve the file with GZIP compression. maybe because the file is loading from lfs
:
maybe for now only supporting compressed shapefile is the right way to go
appreciate the feedback! yes it was a deeper well than I expected, what you might not know about is the SOzip feature in GDAl, which was separated out to make streaming from zip way better (I've lost track of what version of GDAL that is or will be in, but it's coming)
anyway I'm having fun with this, it's very much needed for me - rgeoboundaries was good but there's a lot of infrastructure layering that I don't want there - I'm learning a lot and having ideas, more to come
https://twitter.com/blankxk/status/1632776045261668352?s=20