]> git.openstreetmap.org Git - rails.git/commit
Improve guessing of labels for Nominatim results
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 1 Dec 2020 21:37:09 +0000 (22:37 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 1 Dec 2020 21:52:40 +0000 (22:52 +0100)
commita7b95e2a63e31f8c293cff014333b4da2dc0dc11
tree32aab94dc1268da4f41b03f04d3c4c06864cdba6
parentc418523ed8bd64ea4ff822f8ce390038c8b18b61
Improve guessing of labels for Nominatim results

This adapts to two changes in place handling by Nominatim:

* Place links that are computed by Nominatim are now found in
  extratags['linked_places']. Keep the check for extratags['place']
  as this may contain an explicitly mapped place label.
* Use address rank for guessing the admin level. This gets normalised
  by Nominatim with respect to country-specific use of admin_level.

Also adds additional labels for admin levels, so that we now have
complete coverage for all levels that are in use in OSM.
app/controllers/geocoder_controller.rb
config/locales/en.yml