pelias-deprecated / quattroshapes

(DEPRECATED) Pelias import pipeline for Quattroshapes
https://github.com/pelias/whosonfirst
5 stars 1 forks source link

use admin-lookup #21

Closed sevko closed 9 years ago

sevko commented 9 years ago

Turns out that we should use pelias/admin-lookup in this importer as well (indeed, using Quattroshapes to set its own admin-values), because the admin-hierarchy present in Quattro records out-of-the-box is incomplete, and the importer only bothers setting admin0, admin1, and admin2 values anyway. The end result is that records like neighborhoods are left without proper locality and local_admin names, as shown in the following example:

{
    "name": "East New York",
    "alpha3": "USA",
    "admin0": "United States",
    "admin1": "New York",
    "admin2": "Brooklyn",
    "text": "East New York, Brooklyn, New York"
}

The same record, when passed through admin-lookup, gets the more accurate admin values shown below:

{
    "alpha3": "USA",
    "admin0": "United States",
    "admin1": "New York",
    "admin2": "Kings County",
    "local_admin": "Brooklyn",
    "locality": "New York",
    "neighborhood": "East New York",
    "admin1_abbr": "NY"
}