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

Some ski areas are missing region metadata #139

Open
dhimmel opened this issue Oct 14, 2024 · 11 comments
Open

Some ski areas are missing region metadata #139

dhimmel opened this issue Oct 14, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@dhimmel
Copy link

dhimmel commented Oct 14, 2024

I noticed that Black Mountain in New Hampshire is missing location fields location__iso3166_2 and location__localized__en__region:

  'ski_area_id': 'fe8efce409aa78cfa20a1e6b5dd5e32369dbe687',
  'ski_area_name': 'Black Mountain',
  'location__iso3166_1Alpha2': 'US',
  'location__iso3166_2': None,
  'location__localized__en__country': 'United States',
  'location__localized__en__region': None,
  'location__localized__en__locality': None,

Compare that to nearby Wildcat Mountain:

  'ski_area_id': '24b8924be38edd6e594f4c8f8f62531ed9ff6bf0',
  'ski_area_name': 'Wildcat Mountain',
  'location__iso3166_1Alpha2': 'US',
  'location__iso3166_2': 'US-NH',
  'location__localized__en__country': 'United States',
  'location__localized__en__region': 'New Hampshire',
  'location__localized__en__locality': None,

What allows region lookup for Wildcat but not Black? If its values missing from underlying datasets like OpenStreetMap, I'm happy to contribute this information.

For my current use case, I'd like the ability to assign all ski areas in the United States to their respective states.

@dhimmel
Copy link
Author

dhimmel commented Oct 14, 2024

Possibly follow up of #25

@russellporter
Copy link
Owner

We are using photon for geocoding. For some reason it doesn't return a state for the Black Mountain location, example: https://photon.komoot.io/reverse?lon=-71.16572179999997&lat=44.17919490000001&lang=en

@russellporter russellporter closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2024
@dhimmel
Copy link
Author

dhimmel commented Oct 15, 2024

Thanks for the photon info. I opened komoot/photon#838.

To do these geocoding lookups and to display the ski area dots in the webapp, I am assuming there is a single coordinate calculated to represent each ski area.

In ski_areas.geojson, I do see many ski areas have a geometry with type point. However, some ski areas like 6f15b72c3f5e0355923085e2ad419d03f42dbfe6 have a polygon geometry. What point do you use to represent a polygon as a single coordinate? Is that materialized anywhere in the output?

@russellporter
Copy link
Owner

If I recall correctly, we use the centroid of the polygon but I can't remember anymore. Likely if you search for centroid you will find it in the code.

@dhimmel
Copy link
Author

dhimmel commented Oct 20, 2024

If I recall correctly, we use the centroid of the polygon

Cool possibly the code here and here.

@dhimmel
Copy link
Author

dhimmel commented Nov 5, 2024

@russellporter as per komoot/photon#838, photon has fixed the issue so many more ski areas should now get region and locality location metadata. Do you happen to know when the OpenSkiMap geocoding will rerun and if any caches need to be invalidated on your end?

@russellporter
Copy link
Owner

Thanks! I've purged the cache so it should repopulate. However when the job ran last night it looks like the photon api calls were heavily rate-limited, so at the moment a lot of ski areas don't have any geocoding. I expect the data gaps should fill in over the next few days as the job runs nightly.

@russellporter russellporter reopened this Nov 14, 2024
@russellporter
Copy link
Owner

Re-opening as there seems to be some issues with repopulating the geocode cache

@russellporter russellporter added the bug Something isn't working label Nov 14, 2024
@russellporter
Copy link
Owner

Ok looks good now

@dhimmel
Copy link
Author

dhimmel commented Nov 18, 2024

Great. Locations looking much more complete.

I think there might be an issue with ski areas in the Czech Republic. Example Aldrov - Prezidentský expres. If I use query https://photon.komoot.io/reverse?lon=15.51456&lat=50.68039&lang=en, I see

{
  "features": [
    {
      "geometry": {
        "coordinates": [15.5161847732722, 50.6805566],
        "type": "Point"
      },
      "type": "Feature",
      "properties": {
        "osm_id": 98362175,
        "extent": [15.5160792, 50.6806249, 15.5162882, 50.6804853],
        "country": "Czechia",
        "city": "Vítkovice",
        "countrycode": "CZ",
        "postcode": "51238",
        "county": "Liberec Region",
        "type": "house",
        "osm_type": "W",
        "osm_key": "building",
        "housenumber": "23",
        "osm_value": "house",
        "state": "Northeast"
      }
    }
  ],
  "type": "FeatureCollection"
}

But this location information doesn't get pulled in by OpenSkiMap. Possibly country name Czechia is causing a mismatch.

@dhimmel
Copy link
Author

dhimmel commented Dec 2, 2024

Another ski area missing country currently is Asahi Tengusuton (アサヒテングストン), although the photon lookup seems to include country:

Expand for photon JSON response
{
  "features": [
    {
      "geometry": {
        "coordinates": [132.3514367, 34.8233159],
        "type": "Point"
      },
      "type": "Feature",
      "properties": {
        "osm_type": "W",
        "osm_id": 60313965,
        "extent": [132.3457409, 34.8262769, 132.3542857, 34.8166542],
        "country": "Japan",
        "osm_key": "waterway",
        "city": "Hamada",
        "countrycode": "JP",
        "osm_value": "stream",
        "postcode": "697-0631",
        "name": "大石谷川",
        "state": "Shimane Prefecture",
        "type": "other"
      }
    }
  ],
  "type": "FeatureCollection"
}

@russellporter russellporter changed the title Black Mountain of New Hampshire USA is missing location region metadata Some ski areas are missing region metadata Jan 13, 2025
@russellporter russellporter reopened this Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants