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

geonames:country /v1/autocomplete result missing label attribute #720

Closed
bdon opened this issue Nov 14, 2016 · 4 comments
Closed

geonames:country /v1/autocomplete result missing label attribute #720

bdon opened this issue Nov 14, 2016 · 4 comments
Labels

Comments

@bdon
Copy link

bdon commented Nov 14, 2016

https://search.mapzen.com/v1/autocomplete?text=phil&api_key=

in the features list this entry does not have a label attribute:

{"type":"Feature","geometry":{"type":"Point","coordinates":[122,13]},"properties":{"id":"1694008","gid":"geonames:country:1694008","layer":"country","source":"geonames","source_id":"1694008","name":"Republic of the Philippines","accuracy":"centroid"}}

This started to appear around October 24.

@orangejulius
Copy link
Member

Hey @bdon,
Thanks for the report! We'll look into this, for now here's a screenshot of a query using our compare tool for convenience.

screenshot from 2016-11-14 15-20-31

@trescube
Copy link
Contributor

trescube commented Nov 14, 2016

Interestingly, the 2nd result is a geonames record that is missing all of it's parent hierarchy:

{
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          122,
          13
        ]
      },
      "properties": {
        "id": "1694008",
        "gid": "geonames:country:1694008",
        "layer": "country",
        "source": "geonames",
        "source_id": "1694008",
        "name": "Republic of the Philippines",
        "accuracy": "centroid"
      }
    }

I expect what's happening is that the lon/lat 122/13 from geonames doesn't lie inside the multipolygon for the Philippines. We could probably modify our wof-pip-service to create a convex hull (or some sort of polygon generalization) for all the constituent polygons for countries.

This doesn't affect the first result since it's WOF and we don't do PiP to establish its hierarchy.

@bdon
Copy link
Author

bdon commented Nov 14, 2016

@trescube unsure about the implications within Pelias but wouldn't that fail to generalize for exclaves like Alaska or Kaliningrad?

Thanks for tracking this down so fast!

@trescube
Copy link
Contributor

Alaska and Kaliningrad appear to both be pretty large land masses where the lat/lon probably exists within the polygons representing the available land. The problem with the Philippines is that the centroid from geonames falls outside of the various island polygons. We might just have to special case this for country polygons but we'll have to experiment a bit to be sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants