mdsumner / geobs

What the Package Does (One Line, Title Case)
Other
1 stars 0 forks source link

get up to date #1

Open mdsumner opened 1 year ago

mdsumner commented 1 year ago

https://twitter.com/blankxk/status/1632776045261668352?s=20

mdsumner commented 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.

mdsumner commented 1 year ago
mdsumner commented 1 year ago

json in the zips

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
chapmanjacobd commented 1 year ago

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

mdsumner commented 1 year ago

good point

mdsumner commented 1 year ago

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

chapmanjacobd commented 1 year ago

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:

https://raw.githubusercontent.com/wmgeolab/geoBoundaries/main/releaseData/gbOpen/SWE/ADM1/geoBoundaries-SWE-ADM1_simplified.topojson

maybe for now only supporting compressed shapefile is the right way to go

mdsumner commented 1 year ago

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