Nominatim icon indicating copy to clipboard operation
Nominatim copied to clipboard

Country-specific Address Formats

Open pyrog opened this issue 10 years ago • 10 comments

I would like to test existing Country Address Format. The goal is to create some for my country.

Could you give me some query/examples that display adresses in theses format ?

pyrog avatar Dec 17 '14 16:12 pyrog

To my knowledge the configuration on that wiki page is not used (yet). Have a look at the configuration and test cases in https://github.com/lokku/address-formatting/ . Always looking for more test cases. To create pretty output you need a formatter which interprets the Nominatim data output. There is one written in Perl https://github.com/lokku/perl-Geo-Address-Formatter, somebody is working on Python and Javascript.

mtmail avatar Dec 17 '14 16:12 mtmail

Indeed. If this feature ever gets implemented, it's much more likely to use the data from the lokku project.

lonvia avatar Dec 17 '14 16:12 lonvia

Just to update this issue, the address-formatting repo has moved to https://github.com/OpenCageData/address-formatting

we now have 100% coverage and 86% of territories have at least one test. Slowly I am adding more, I expect 100% test coverage by 1 April 2016. Of course there are many, many edge cases, so more eyeballs and tests are definitely needed. All help much appreciated

freyfogle avatar Mar 03 '16 11:03 freyfogle

when addresses will be fixed? Example 1:

all valid addresses -> http://overpass-turbo.eu/s/hVV
adama mickiewicza 6, lublin -> incorrect! first result from zamość,
should be http://www.openstreetmap.org/way/319339020
adama mickiewicza 8, lublin -> incorrect! first result from zamość,
should be http://www.openstreetmap.org/node/2604114620
adama mickiewicza 10, lublin -> incorrect! first result from zamość,
should be http://www.openstreetmap.org/node/2604092061
adama mickiewicza 12, lublin -> incorrect! first result from zamość,
should be http://www.openstreetmap.org/way/352817713
adama mickiewicza 14, lublin -> incorrect! first result from zamość,
should be http://www.openstreetmap.org/node/2604099139
adama mickiewicza 16, lublin -> incorrect! first result from chełm,
should be http://www.openstreetmap.org/way/352817730
adama mickiewicza 18, lublin -> incorrect! first result from zamość,
should be http://www.openstreetmap.org/way/352817758
adama mickiewicza 19, lublin -> correct :)
adama mickiewicza 21, lublin -> correct :)
adama mickiewicza 23, lublin -> correct :)
23...107 -> correct :)
adama mickiewicza 107, lublin -> correct :)

Example 2:

all valid addresses -> http://overpass-turbo.eu/s/hVY
tadeusza kościuszki 1, lublin -> incorrect! first result from włodawa,
should be http://www.openstreetmap.org/node/833340653
tadeusza kościuszki 2, lublin -> correct :)
tadeusza kościuszki 3, lublin -> incorrect! first result from puławy,
should be http://www.openstreetmap.org/node/833340651
tadeusza kościuszki 4, lublin -> incorrect! first result from puławy,
should be http://www.openstreetmap.org/node/814991082
tadeusza kościuszki 5, lublin -> incorrect! first result from puławy,
should be http://www.openstreetmap.org/node/833340647
tadeusza kościuszki 6, lublin -> incorrect! first result from puławy,
should be http://www.openstreetmap.org/way/67508881
tadeusza kościuszki 7, lublin -> incorrect! first result from puławy,
should be http://www.openstreetmap.org/node/833340681
tadeusza kościuszki 8, lublin -> incorrect! first result from puławy,
should be http://www.openstreetmap.org/node/814991080
tadeusza kościuszki 10, lublin -> incorrect! first result from puławy,
should be http://www.openstreetmap.org/node/814991077


RafalR avatar Aug 19 '16 09:08 RafalR

FYI: iD uses a small lookup table based on country code, c.f. https://github.com/openstreetmap/iD/blob/master/data/address-formats.json

Why not use the same or a similar lookup table to generate a places' display_name attribute?

saerdnaer avatar Sep 05 '18 21:09 saerdnaer

Just to update this issue, the address-formatting repo has moved to https://github.com/OpenCageData/address-formatting

@lonvia, Apparently one implementation of this exists in PHP: https://github.com/predicthq/address-formatter-php, any good reason (except time ;-)) not to use it?

Bibi56 avatar Jul 01 '20 14:07 Bibi56