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

Incorrect locality interpolation #287

Open
ambrusadrianz opened this issue Feb 19, 2020 · 8 comments
Open

Incorrect locality interpolation #287

ambrusadrianz opened this issue Feb 19, 2020 · 8 comments

Comments

@ambrusadrianz
Copy link

Hey team!

I was using your awesome geocoding engine when I noticed something interesting.
Let me tell you more about it.


Here's what I did 😇

https://pelias.github.io/compare/#/v1/autocomplete%3Flayers=street&focus.point.lat=59.4391&focus.point.lon=17.9415&text=granva&size=1


Here's what I got 🙀

{
  "geocoding": {
    "version": "0.2",
    "attribution": "http://api.yourpelias.com/attribution",
    "query": {
      "text": "granva",
      "parser": "pelias",
      "parsed_text": {
        "subject": "granva"
      },
      "size": 1,
      "layers": [
        "street"
      ],
      "private": false,
      "focus.point.lat": 59.4391,
      "focus.point.lon": 17.9415,
      "lang": {
        "name": "English",
        "iso6391": "en",
        "iso6393": "eng",
        "defaulted": false
      }
    },
    "engine": {
      "name": "Pelias",
      "author": "Mapzen",
      "version": "1.0"
    },
    "timestamp": 1582112887879
  },
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          17.950292,
          59.413714
        ]
      },
      "properties": {
        "id": "polyline:481559",
        "gid": "openstreetmap:street:polyline:481559",
        "layer": "street",
        "source": "openstreetmap",
        "source_id": "polyline:481559",
        "name": "Granvägen",
        "street": "Granvägen",
        "distance": 2.869,
        "accuracy": "centroid",
        "country": "Sweden",
        "country_gid": "whosonfirst:country:85633789",
        "country_a": "SWE",
        "region": "Stockholm",
        "region_gid": "whosonfirst:region:85688429",
        "region_a": "ST",
        "county": "Stockholm",
        "county_gid": "whosonfirst:county:1159303035",
        "localadmin": "Vantor",
        "localadmin_gid": "whosonfirst:localadmin:1125362217",
        "locality": "Stockholm",
        "locality_gid": "whosonfirst:locality:101752307",
        "neighbourhood": "Kista",
        "neighbourhood_gid": "whosonfirst:neighbourhood:85902231",
        "continent": "Europe",
        "continent_gid": "whosonfirst:continent:102191581",
        "label": "Granvägen, Stockholm, Sweden"
      },
      "bbox": [
        17.949897,
        59.412975,
        17.951959,
        59.414611
      ]
    }
  ],
  "bbox": [
    17.949897,
    59.412975,
    17.951959,
    59.414611
  ]
}

Here's what I was expecting ✨

Something seems to be off with the lookup. This street should be in Sollentuna locality (kommun) not in Stockholm.

@missinglink
Copy link
Member

Hi @ambrusadrianz, this record was associated with Stockholm because the lat/lon is contained within this polygon https://spelunker.whosonfirst.org/id/101752307/

I'm not familiar with Stockholm geography, is this shape not correct?

@missinglink
Copy link
Member

We also have this polygon https://spelunker.whosonfirst.org/id/1125772423/

@missinglink
Copy link
Member

this tool illustrates some of the upcoming functionality of our new spatial service: https://spatial.synergy.io/explore/pip#13/59.413714/17.950292

@ambrusadrianz
Copy link
Author

I'm not really familiar with Stockholm geography neither. I just happen to work on a project which needs geocoding for Sweden.

Sollentuna is just a locality inside Stockholm county as far as I know. So this Stockholm polygon might be too broad.

OpenstreetMap Nominatim seems to get this right. query for granvagen

@ambrusadrianz
Copy link
Author

The problem might be with the WOF locality placeType classification. Because this seems more like Stockholm county.

@missinglink
Copy link
Member

missinglink commented Feb 19, 2020

We don't currently use OSM boundary data, although this is on the roadmap.

If you compare the records from WOF and OSM you'll find that they are very similar:

Some options for you:

  • Open a bug report at https://github.com/whosonfirst-data/whosonfirst-data highlighting an error (if there is one?) in the WOF data and offering a suggested edit to fix it
  • If there is a bug in wof-admin-lookup then let us know, I don't believe the bug is within Pelias
  • Sponsor or contribute to the new spatial service which will allow a mix of WOF and OSM boundary data in Pelias.

@ambrusadrianz
Copy link
Author

The new spatial service looks really cool. I will check it out. Keep up the good work 👍

Seems like the WOF classification for that area is too broad, I will put an issue on WOF to see what they think.

Do you have a roadmap for the spatial service?

@ambrusadrianz
Copy link
Author

ambrusadrianz commented Feb 21, 2020

@missinglink this can be closed I think. Added one on WOF: whosonfirst-data/whosonfirst-data#1794

Thanks for the fast responses 👍

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

No branches or pull requests

2 participants