In a previous post I presented the jts-discretizer, a small project able to approximate geometries with geo-hashes. Now it’s the time to see it in action: we will work in Scala on a dataset of country borders(multi-polygons) and see how to approximate country surfaces with geo-hashes.
The original dataset
We will use borders provided by Natural Earth. A simplified version of this dataset can be found at borders_wkt.csv, having the following columns:
continent
country name
fips country code (-99 if not present in the Natural Earth dataset)
iso country code (-99 if not present in the Natural Earth dataset)