Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outputGenerator tweaks #46

Closed
missinglink opened this issue Dec 1, 2014 · 2 comments · Fixed by #301
Closed

outputGenerator tweaks #46

missinglink opened this issue Dec 1, 2014 · 2 comments · Fixed by #301
Assignees
Labels
Milestone

Comments

@missinglink
Copy link
Member

In the following example, the 'text' should be 'Arbil, Iraq' but due to the way the outputGenerator is written it matches nothing for local and 'Arbil' for regional (the name is also 'Arbil').

If I simply add admin1 to the end of the local array then both local and regional will match 'Arbil' and when the de-duper removes one entry, we are back with the text being 'Arbil'.

Not sure if I described this well, but basically we need to continue checking values in the local and regional arrays until we find a value which is not a duplicate of the name or another admin value, otherwise a POI with { "name": "a", "local_admin": "a", "admin1_abbr": "a", "admin0": "b" } will always just be a when it would be nicer if it were a, b.

Hope that makes sense ;)

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          44.180874,
          36.369878
        ]
      },
      "properties": {
        "id": "1110:adm1:iq:irq:arbil",
        "type": "admin1",
        "layer": "admin1",
        "name": "Arbil",
        "alpha3": "IRQ",
        "admin0": "Iraq",
        "admin1": "Arbil",
        "text": "Arbil"
      }
    },
...
@hkrishna
Copy link
Contributor

This bug will get addressed/fixed in #100

@dianashk dianashk added this to the Pelias v1.0.0 milestone May 4, 2015
@dianashk
Copy link
Contributor

dianashk commented Jul 8, 2015

Revisit after API redesign

@dianashk dianashk removed the on-deck label Jul 8, 2015
@riordan riordan added the v1 label Aug 13, 2015
This was referenced Sep 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants