Month: January 2021
MapDiffering Results in Reverse Geocoding
My Simple Location plugin offers the option of several different reverse geocoders. All of the providers, like the weather providers, standardize the output into a modified array based on microformats properties.
- street-address – house/apartment number, floor, street name
- extended-address – additional street details
- locality – city/town/village
- region – state/county/province
- postal-code – postal code, e.g. ZIP in the US
- country-name – full name of country or country code.
The problem is, returns are not so consistent. Not only will the same coordinates not always produce consistent results, but the fields always change. So, the logic to map to the above properties isn’t always consistent or easy to write.
The second part of the problem is display. How to actually display the information. This isn’t the same as traditional address issue, this is how to display it in context on posts.
For example, for the White House…
-
- Nominatim – White House, 1600, Pennsylvania Avenue Northwest, Washington, Washington, D.C., 20500, United States
- Mapquest – 1602 Pennsylvania Avenue, Washington, District Of Columbia, United States
- OpenMapquest and LocationIQ – White House, 1600, Pennsylvania Avenue Northwest, Golden Triangle, Washington, District of Columbia, 20500, United States of America
- Google – 1600 Pennsylvania Avenue Northwest, District of Columbia
- HERE – 1600 Pennsylvania Ave NW, Washington, DC 20500-0005, United States, Washington, District of Columbia, United States
- Bing – 1600 Pennsylvania Ave NW, Washington, DC 20006
- Geonames – District of Columbia, District of Columbia, United States
- OpenRoute – 1600 Pennsylvania Avenue NW, Washington, DC, USA, White House Grounds, Washington, District of Columbia, United States
Reverse geocoding…taking coordinates and returning a location name, will never be 100% consistent, But I decided I needed to do better than this, and am working to adjust to be more consistent. Unfortunately, with 9 different providers, it takes a while to figure out what I’m going to do. Redundancy is good, but has its challenges.