Hmm 🤔 disappointing state of affairs!!
Then again, not all data formats can be (are!) as cutting-edge as yours truly 🤷 #gischat #gis #flatgeobuf #protobuf #shapefile
#gischat #GIS #flatgeobuf #protobuf #shapefile
Encoding the entire GNAF as a #flatgeobuf produces a big file. 7.24GB.
But assuming you can find somewhere on the web (that supports HTTP range requests) to stick this file, leverage the way flatgeobuf files work in just the same way as we did to find regions.
There's also this very handy implementation on NPM https://www.npmjs.com/package/flatgeobuf
We can do that without ever running code on a server and (crucially) without having to download all the SA1 regions. That #flatgeobuf file that lives on the CDN and can be cached everywhere is 170MB so it's good we don't have to download it.
So we now have a reverse #geocoder that can put coordinates in a bunch of different types of regions.
You can see the code an a bit more about how to prepare the #flatgeobuf files yourself at GitHub https://github.com/abcnews/reverse-geocoder
So a while ago, I set about trying to do that. Here's the result https://www.abc.net.au/res/sites/news-projects/reverse-geocoder/main/
Now this only works for #Australia because that's our primary audience, but the idea scales fairly well. Want to know how it works? [pause for assent] Okay then.
This uses a very interesting file format called a #flatgeobuf https://github.com/flatgeobuf/flatgeobuf
It's a binary format which makes it pretty space efficient for storing large geodata. But the interesting thing about it is that it has a spatial index