Developing EOS Vision as a tool for not only GIS-professionals it was a crucial task to adopt services transforming geospatial data in the text format to geometry. The idea supporting this is to keep users’ psyche safe by not letting them work with the Shapefile only. Supporting CSV, XLS, XLSX formats with geospatial data as latitude an longitude were not enough since it is still a common way to store geospatial data as addresses. So, we were ready to go deep into Geocoding.
There are plenty of geocoding services. As a first iteration, we have decided to try Nominatim — the geocoding tool based on OpenStreetMap data. While developing the technical description of the task, the first question appeared was the following:
Could Nominatim be used for all the countries?
I could not find such information in the documentation, as well as on GIS StackExchange (spoilers alert). In addition to the coverage question, we have wanted to evaluate the quality of geocoding by accuracy, precision, preferable input data formats etc.
In this article, I would mention Nominatim data coverage, Reverse vs Direct Geocoding, and additional features appeared during this small research.
No OpenStreetMap was harmed in the making of this research. Everything run on the OSM replication.
It seems to be a simple task — check if the geocoder works for all the countries: find some sample of addresses for all the countries and run the geocoder. Okay, it seems easy. Let’s just find the data. Believe me or not — it is not what you can find by just googling it. I was sure GIS-geeks met similar tasks, so I went to Twitter, asked the community, and got the brilliant answer:
That’s easy! Next steps were simple: Natural Earth (I’m still mad at you, guys), QGIS (random 100 points per country), geopy. Now I was ready to answer the original question. Running direct geocoding from addresses dataset showed Nominatim is available for all the countries.
During the previous task I have spotted an interesting thing — reverse geocoding returns not only the address but also latitude and longitude:
"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
"display_name":"Palianychyntsi, Fastiv Raion, Kyiv Oblast, 08542, Ukraine",
I made an assumption this is the coordinates of the address returned, but I have noticed a thing — the point with address “AAT, Antarctica” has been returned from Reverse Geocoding, but could not be recognized by direct geocoding.
To check how different results are, I have connected coordinates from reverse geocoding with coordinates from direct geocoding. Results were absolutely various:
Okay, it becomes more and more intriguing. Do reverse or direct geocoding return inappropriate results? Hold on, what if we go further, and run reverse geocoding based on coordinates returned from direct geocoding based on addresses returned from reverse geocoding based on random coordinates! It looks fun, isn’t it?
You may explore the map and find out that Direct Geocoding results are usually more precise than the ones taken from Reverse Geocoding. Does it look like a scientific breakthrough? Not sure, but it looks nice, isn’t it?
For me personally, the most interesting things on the map became “spider webs” usually showing the nearest address from the random coordinates. That was a little spoiler for the next episode of “How good is Open Data”?