pelias/geonames

Name in Pelias does not match name in Geonames

Opened this issue · 3 comments

Geonames record 2188922 is named Kelburn, but for some reason, it's named Northland in Pelias?

/v1/place?ids=geonames:neighbourhood:2188922

{
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [
      174.76667,
      -41.28333
    ]
  },
  "properties": {
    "id": "2188922",
    "gid": "geonames:neighbourhood:2188922",
    "layer": "neighbourhood",
    "source": "geonames",
    "source_id": "2188922",
    "name": "Northland",
    "accuracy": "centroid",
    "country": "New Zealand",
    "country_gid": "whosonfirst:country:85633345",
    "country_a": "NZL",
    "region": "Wellington Region",
    "region_gid": "whosonfirst:region:85687233",
    "region_a": "WG",
    "county": "Wellington City",
    "county_gid": "whosonfirst:county:102079339",
    "county_a": "WE",
    "neighbourhood": "Northland",
    "neighbourhood_gid": "whosonfirst:neighbourhood:85773067",
    "continent": "Oceania",
    "continent_gid": "whosonfirst:continent:102191583",
    "label": "Northland, New Zealand"
  }
}

Interestingly, the name is correct when asking for a different language as per /v1/place?lang=ko&ids=geonames:neighbourhood:2188922

So I guess the error must lie with the translation code in API.

This doesn't seem to be in the changeLanguage middleware, because even if it was doing a placeholder query, there is no matching id in WOF:

placeholder://parser/findbyid?ids=2188922
{}

Yeah this must be a super weird bug in the translation layer. I confirmed the record in Elasticsearch is called Kelburn:

curl -s localhost:9200/pelias/neighbourhood/2188922 | jq ._source.name
{
  "default": "Kelburn"
}

It's probably something Geonames specific