3 ms·
We were going to not display suburb data because of cost. In the end I found a creative commons placename database (geonames.org). For placenames with >500 peop
by nerdponx 7y ago
We were going to not display suburb data because of cost. In the end I found a creative commons placename database (geonames.org). For placenames with >500 people it's ~10MB of data and that covers the entire planet (surprisingly small). I then wrote a KD-Tree based library to look it up the nearest point in this table extremely efficiently (log(N) time).
At a previous employer I tried to convince my managers to let me do this for months. They always balked. Their loss.