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

[Geocoding] Add adminX_code #355

Closed
papjul opened this issue Jun 7, 2023 · 3 comments
Closed

[Geocoding] Add adminX_code #355

papjul opened this issue Jun 7, 2023 · 3 comments

Comments

@papjul
Copy link

papjul commented Jun 7, 2023

Just like we have country_code (IT, FR, etc), would it be possible to add admin1_code, admin2_code, etc?

image

image

This will be useful for #351 as Météo-France emits alerts by admin2 and using the admin2_code is much easier than having to parse the admin2 translatable field.

Thank you!

@patrick-zippenfenig
Copy link
Member

Hi,

thanks for the suggestion. I my experience weather alerts by national weather services are very particular how they regions are defined. In previous projects I tried to match the genomes database with official alerts, but it only worked for ~90% of regions.

Did you try to use polygons to define regions more accurately and then use coordinate-is-inside-polygon lookups to find warnings for this region?

@papjul
Copy link
Author

papjul commented Jun 8, 2023

I can only speak for Météo-France. Alerts are emitted by département.

Of course, sometimes an alert won't be valid for the whole département but it will be written in the alert description (for orange and red alerts).

Each département has its own thresholds. For example, heat alert will be emitted in Bouches-du-Rhône if temperature doesn't go below 24 °C at night and go above 35 °C during the day. In Côtes d'Armor, thresholds are 18 °C and 31 °C. Of course, these alerts are emitted by Météo-France, you don't have to calculate anything, but just to show you how important this code is for me to be able to show alerts at the moment (while waiting for an Open-Meteo alerts endpoint).

Polygon calculation is not an option for me, as it's for an Android app, and this is a too heavy operation.

@papjul
Copy link
Author

papjul commented Aug 16, 2023

Reopened in the correct repo here: open-meteo/geocoding-api#11

@papjul papjul closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2023
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