pelias / geonames

Import pipeline for geonames in to Pelias
https://pelias.io
MIT License
43 stars 37 forks source link

disable admin lookup for countries #25

Closed missinglink closed 8 years ago

missinglink commented 8 years ago

This record is for a country, in this case we should never try to look up admin values because (in theory at least) it will not intersect other polygons.

In this case it has intersected North Tipperary (which is wrong for many reasons) and so the label ends up being Ireland, North Tipperary (again very wrong) when it should just be Ireland.

disable admin lookup for countries

http://www.geonames.org/2963597/ireland.html http://api.geonames.org/getJSON?geonameId=2963597&username=demo

GET /pelias/geoname/2963597
{
   "_index": "pelias",
   "_type": "geoname",
   "_id": "2963597",
   "_version": 1,
   "found": true,
   "_source": {
      "center_point": {
         "lon": -8,
         "lat": 53
      },
      "address": {},
      "name": {
         "default": "Ireland"
      },
      "admin1": "North Tipperary",
      "alpha3": "IRL",
      "admin0": "Ireland",
      "category": [
         "government"
      ],
      "population": 4622917
   }
}
missinglink commented 8 years ago

semi-related: https://github.com/whosonfirst/whosonfirst-data/issues/115

riordan commented 8 years ago

At some point, we should be able to trust the WoF documents so we don't have to admin lookup the admin areas.

riordan commented 8 years ago

We can't fix this until WoF is live

riordan commented 8 years ago

To be reviewed after we update the Geonames importer for Who's on First.

orangejulius commented 8 years ago

This is fixed by wof-admin-lookup#37, as well as the previous work to allow only some admin layers to be looked up.