New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lookup returns "short_name" as city instead of name or address:city #783

Open
3add3287 opened this Issue Aug 23, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@3add3287

3add3287 commented Aug 23, 2017

Hi

when doing lookups for coordinates nomination returns short_name instead of name. This is problematic b/c

  • A number of places have unofficial names, nick names or abbreviations listed with the short_name tag.
  • The key definition doesn't mandate that short_name is an official name (so these entries are not actually incorrect). Reference: http://wiki.openstreetmap.org/wiki/Key:name
  • The official (non-short, i.e. full) name is official and recognized everywhere
  • Anyone looking for an address for a set of coordinates seems to be most likely interested in an accurate address, not a short version. Considering the length of the full address I don't see how using the short name helps keeping the result significantly shorter (beside it being less/not useful)

Example below:
$ curl -H "Content-Type: text/json; charset=UTF-8" 'http://nominatim.openstreetmap.org/search/49.039%2012.13?format=json&addressdetails=1'
[{"place_id":"93913350","licence":"Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright","osm_type":"way","osm_id":"114354222","boundingbox":["49.0386887","49.0388809","12.1291585","12.1294229"],"lat":"49.03878475","lon":"12.1292907023623","display_name":"13, Am Flachlberg, Brandlberg, Rgbg, Regensburg, OPf, Bayern, 93057, Deutschland","class":"building","type":"yes","importance":0.001,"address":{"house_number":"13","road":"Am Flachlberg","suburb":"Brandlberg","city":"Rgbg","county":"Regensburg","state_district":"OPf","state":"Bayern","postcode":"93057","country":"Deutschland","country_code":"de"}}]

@lonvia lonvia added the data issue label Aug 28, 2017

@lonvia

This comment has been minimized.

Show comment
Hide comment
@lonvia

lonvia Aug 28, 2017

Collaborator

Your first point is a data issue. short_name should be a recognizable, commonly used short version of the name, not a nick name (use alt_name for that) and not an abbreviation (might go into ref, although that's a stretch, too) and it should certainly be correct. As for wanting the full official name or the short form, there is an argument for both. What you really want for displaying results (which is the main use of nominatim) is the most commonly used name. I haven't done any systematic research but I'd say the shorter version is more likely to be used as long as it is reasonably distinctive.

Collaborator

lonvia commented Aug 28, 2017

Your first point is a data issue. short_name should be a recognizable, commonly used short version of the name, not a nick name (use alt_name for that) and not an abbreviation (might go into ref, although that's a stretch, too) and it should certainly be correct. As for wanting the full official name or the short form, there is an argument for both. What you really want for displaying results (which is the main use of nominatim) is the most commonly used name. I haven't done any systematic research but I'd say the shorter version is more likely to be used as long as it is reasonably distinctive.

@3add3287

This comment has been minimized.

Show comment
Hide comment
@3add3287

3add3287 Sep 1, 2017

It might be a data issue as well but that's IMHO not clear with the ambiguous definitions there. The English excludes abbreviations, which Rgbg is. The German version in the wiki does not mention any of that. But even with nick names and abbreviations excluded, a "recognizable, commonly used short version of the name" as describe by the wiki is too vague and indistinctive.
Not that "name" is suddenly 100% clear and distinctive - it seems only the definition of "official_name" would fit that. However, while "common default name" for the name key is vague, the reference to street signs makes this distinctive enough as that gets very close to an official short name.

Aside from the definition of the keys in openstreetmap, a number of use cases for Nominatim reverse lookups I see include using the resulting data. For that using city = short_name does seem to come with a number of problems that "name" wouldn't "name" is defined as a short common form but doing it in a context of official names due to the street sign reference.

The same applies to "OPf" for admin_level=5 relation that Regensburg is in. I've seen it being referred to as OPf only very few times outside a Openstreetmap context, but it seems somewhat official and maybe common. But what is common? That depends on the audience, and I'd say that 99% of the people seeing the output above would not have any idea what it means and no parsing algorithm could make any sense of it - unless it's using OSM data.

I can see the short_name being useful in some cases. My argument is that for the majority of the cases it's not useful. In that context I can totally see returning short_name and official_name being returned as separate fields, but not used to form the more distinct fields like "city" (or state, country etc). If the short common form was enough, for countries and states the abbreviation/codes (be it country code, ISO3166-1 or -2) could be used - they are often as if not more common than abbreviations. That wouldn't make short_name incorrect data though...

3add3287 commented Sep 1, 2017

It might be a data issue as well but that's IMHO not clear with the ambiguous definitions there. The English excludes abbreviations, which Rgbg is. The German version in the wiki does not mention any of that. But even with nick names and abbreviations excluded, a "recognizable, commonly used short version of the name" as describe by the wiki is too vague and indistinctive.
Not that "name" is suddenly 100% clear and distinctive - it seems only the definition of "official_name" would fit that. However, while "common default name" for the name key is vague, the reference to street signs makes this distinctive enough as that gets very close to an official short name.

Aside from the definition of the keys in openstreetmap, a number of use cases for Nominatim reverse lookups I see include using the resulting data. For that using city = short_name does seem to come with a number of problems that "name" wouldn't "name" is defined as a short common form but doing it in a context of official names due to the street sign reference.

The same applies to "OPf" for admin_level=5 relation that Regensburg is in. I've seen it being referred to as OPf only very few times outside a Openstreetmap context, but it seems somewhat official and maybe common. But what is common? That depends on the audience, and I'd say that 99% of the people seeing the output above would not have any idea what it means and no parsing algorithm could make any sense of it - unless it's using OSM data.

I can see the short_name being useful in some cases. My argument is that for the majority of the cases it's not useful. In that context I can totally see returning short_name and official_name being returned as separate fields, but not used to form the more distinct fields like "city" (or state, country etc). If the short common form was enough, for countries and states the abbreviation/codes (be it country code, ISO3166-1 or -2) could be used - they are often as if not more common than abbreviations. That wouldn't make short_name incorrect data though...

@tuukka

This comment has been minimized.

Show comment
Hide comment
@tuukka

tuukka Sep 23, 2017

I have a similar point of view as @3add3287 and have reinstated the established definition of short_name in the OSM wiki for now: Common abbreviation, useful for searching (recognized by Nominatim). As Nominatim is not the only system using short_name anymore, the definition can't be interpreted as "whatever Nominatim does".

Functionality should trump aesthetics in OSM: name is what should be displayed on the map and in search results. short_name should be used to supply short names and abbreviations that the user can type in to find the place that they have in mind. That is how e.g. Pelias search and reverse lookup interpret short_name.

tuukka commented Sep 23, 2017

I have a similar point of view as @3add3287 and have reinstated the established definition of short_name in the OSM wiki for now: Common abbreviation, useful for searching (recognized by Nominatim). As Nominatim is not the only system using short_name anymore, the definition can't be interpreted as "whatever Nominatim does".

Functionality should trump aesthetics in OSM: name is what should be displayed on the map and in search results. short_name should be used to supply short names and abbreviations that the user can type in to find the place that they have in mind. That is how e.g. Pelias search and reverse lookup interpret short_name.

@shrddr

This comment has been minimized.

Show comment
Hide comment
@shrddr

shrddr Sep 9, 2018

The wiki says don't put abbreviations in short_name because of a nominatim issue. Nominatim issue says don't put abbreviations in short_name because it's forbidden by the wiki. Hmm smells like a circular reference

shrddr commented Sep 9, 2018

The wiki says don't put abbreviations in short_name because of a nominatim issue. Nominatim issue says don't put abbreviations in short_name because it's forbidden by the wiki. Hmm smells like a circular reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment