pelias / labels

Pelias Label generation
https://pelias.io
MIT License
4 stars 9 forks source link

label showing 'name, country' #30

Open missinglink opened 5 years ago

missinglink commented 5 years ago

In the case where we don't have a locality name the labels can be very vague such as this one which just says KFC, South Africa

      "properties": {
        "id": "way/640077183",
        "gid": "openstreetmap:venue:way/640077183",
        "layer": "venue",
        "source": "openstreetmap",
        "source_id": "way/640077183",
        "name": "KFC",
        "street": "Main Reef Road",
        "accuracy": "point",
        "country": "South Africa",
        "country_gid": "whosonfirst:country:85633813",
        "country_a": "ZAF",
        "region": "Gauteng",
        "region_gid": "whosonfirst:region:85688923",
        "region_a": "GT",
        "county": "West Rand",
        "county_gid": "whosonfirst:county:1108730543",
        "county_a": "WR",
        "continent": "Africa",
        "continent_gid": "whosonfirst:continent:102191573",
        "label": "KFC, South Africa"
      },
orangejulius commented 5 years ago

We fixed this for just the US by allowing county to be used in labels if locality and localadmin are not found. I'm not sure that's valid globally, but we could find a similar solution on a country by country basis if needed.

See https://github.com/pelias/labels/blob/master/labelSchema.js#L85