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

Locality is missing for some locations #304

Open
ShoSashko opened this issue Apr 23, 2021 · 2 comments
Open

Locality is missing for some locations #304

ShoSashko opened this issue Apr 23, 2021 · 2 comments
Labels

Comments

@ShoSashko
Copy link

ShoSashko commented Apr 23, 2021

Describe the bug
It looks like there some issues with locality for some returned regions.
In this particular case, locality is not present in whosonfirst response.

In whosonfirst-data-admin-ua-latest.db that I use, I can confirm the data is present.
image

For example:
https://api.dev.geocode.earth/v1/autocomplete?size=30&boundary.rect.max_lat=49.909829&boundary.rect.max_lon=24.132048&boundary.rect.min_lat=49.757474&boundary.rect.min_lon=23.883483&lang=en&text=%D0%9A%D1%83%D1%80%D0%BE%D1%80%D1%82%D0%BD%D0%B0&api_key=ge-1e618cf3d7bd023d

  "features": [
   {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          23.960205,
          49.903751
        ]
      },
      "properties": {
        "id": "node/2043750839",
        "gid": "openstreetmap:venue:node/2043750839",
        "layer": "venue",
        "source": "openstreetmap",
        "source_id": "node/2043750839",
        "name": "Kurortna",
        "confidence": 1,
        "match_type": "exact",
        "accuracy": "point",
        "country": "Ukraine",
        "country_gid": "whosonfirst:country:85633805",
        "country_a": "UKR",
        "region": "Lviv",
        "region_gid": "whosonfirst:region:85688887",
        "region_a": "LV",
        "county": "L'vivs'ka",
        "county_gid": "whosonfirst:county:1108730647",
        "county_a": "LV",
        "continent": "Europe",
        "continent_gid": "whosonfirst:continent:102191581",
        "label": "Kurortna, LV, Ukraine"
      }
    }
  ],

Steps to Reproduce

Steps to reproduce the behavior:

  1. https://pelias.github.io/compare/#/v1/autocomplete?size=30&boundary.rect.max_lat=49.909829&boundary.rect.max_lon=24.132048&boundary.rect.min_lat=49.757474&boundary.rect.min_lon=23.883483&lang=en&text=%D0%9A%D1%83%D1%80%D0%BE%D1%80%D1%82%D0%BD%D0%B0

Expected behavior

The following request should return the data in https://spelunker.whosonfirst.org/id/101862523/ locality

Pastebin/Screenshots
image

Could you guide me on what the problem might be? Happy to contribute if needed

@ShoSashko ShoSashko added the bug label Apr 23, 2021
@ShoSashko ShoSashko changed the title Locality is missing in some regions Locality is missing for some locations Apr 23, 2021
@missinglink
Copy link
Member

Hi @ShoSashko, the geometry https://spelunker.whosonfirst.org/id/101862523/ isn't a Polygon, the spelunker map is a little confusing as it shows 101862523 as a green point and the parent 1108730647 as a blue polygon.

curl -s 'https://data.whosonfirst.org/101/862/523/101862523.geojson' | jq .geometry

{
  "coordinates": [
    23.959225,
    49.898366
  ],
  "type": "Point"
}

This module is able to perform point-in-polygon lookups, but it doesn't 'guess' the nearest Point-based geometry, this is a design decision we've made to avoid errors when guessing.

A good fix for this issue would be to replace the point 23.959225, 49.898366 with a Polygon, after the data is fixed all addresses and venues which lie inside that shape will have the correct locality associated.

@ShoSashko
Copy link
Author

@missinglink Could you guide me how to fix that?
I believe that the appropriate repository is https://github.com/whosonfirst-data/whosonfirst-data-admin-ua

Is that correct?

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

2 participants