pelias-deprecated / quattroshapes

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

partially specified place names #28

Open missinglink opened 9 years ago

missinglink commented 9 years ago

some places have a text field with names such as "South East" which is not relevant without the context. eg. it should read "South East Singapore".

we could fix this by adding another component to the text field so it reads "South East, Singapore" (note the comma used to concatenate components) although the rules for if/when to do that may not be consistent and may result in regressions for other names.

ideally we could fix this at source, either in the data or more likely with some mapper logic. cc/ @nvkelso

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "id": "2175:adm1:sg:sgp:south_east",
        "layer": "admin1",
        "name": "South East",
        "alpha3": "SGP",
        "admin0": "Singapore",
        "admin1": "South East",
        "text": "South East"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          103.93306123841,
          1.3481404110348
        ]
      }
    }
  ],
  "bbox": [
    103.93306123841,
    1.3481404110348,
    103.93306123841,
    1.3481404110348
  ],
  "date": 1438154960648
}
nvkelso commented 9 years ago

"South East" as a feature name is legit, as long as it includes the country's name (in this case Singapore), and soft enforcement of unique at the same level (can't always do this for Locality, for instance).

It's up to the consumer of the data to construct a hierarchy based string that is less ambiguous across countries / regions. Don't think this should be changed in the quattroshapes source data.

riordan commented 9 years ago

How is this reflected in the suggested text of the response?

missinglink commented 9 years ago

"text": "South East" but this is due to how the outputGenerator works, see https://github.com/pelias/api/issues/152 et al for more examples