We Call it GeoTerra
We have been going around for a while trying to find a single server that can give us the elevation of a location, the timezone at the location, I also need to know the nearest airport also maybe I want to get all of that from an IP lookup? So we took those requirements and went on our journey to find what is out there to support that with very high server response rate. Sadly nothing was there, it was either too expensive as a commercial product or too bloated and slow.
The Weather Tech team decided we should build it. So how do we approach getting the country that location is in? the timezone ? the elevation ? What about the Sun angle at a time ? The moon phase ? So here is how we did it.
- We consumed a very large 10m resolution files describing the borders, a shape file with polygons. This was used to pin point the location within a country border or an administration as well as the time zone of that location.
- We then consumed a 500 meter resolution digital elevation map file in geotiff that will help get the elevation of a location
- Moved from there to consuming MaxMind IP to City lookup to be able to map IPs to locations
- We then took the NodeJs module SunCalc, translated it to D-Lang and from there we integrated it.
- We indexed all the Airport locations into a KD-Tree for fast geo-spatial lookups.
From those we were then capable of generating a server that we call GeoTerra, used mainly to get the previous information on the fly. The server was built on D-Lang and Vibe.d which yielded a massive 9K requests a second for 100 concurrent users a second running a single thread!
Do you want to know more about this product ? Do you have a use case where you can utilize it ? Let us know by emailing email@example.com