-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Query with approximate GPS location return 404 #795
Comments
It is a bug. It tries to resolve GPS pair from the query once again, what makes of course no sense at all. Accepted + will be fixed. |
Any update on this? |
i have also issues with GPS coordinates: this url works: https://wttr.in/52.52045,13.40732 but that not: https://wttr.in/52.52045,13.40731 and taking the coordinates that google maps provides, when copy-n-past the coordinates from the map, also doesn't work: |
Unfortunately, the situation is the same. ![]() |
In addition, appending zeros to a known location will fail: |
Still seeing this. Hope fix gets merged soon |
Fixes chubin#795 This is not finished yet and just a draft with ideas --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/chubin/wttr.in/issues/795?shareId=XXXX-XXXX-XXXX-XXXX).
We have several problems here.
At the moment, the wttr.in service tries to geolocate (resolve into coordinates + human-readable canonical location name) each location, even if it is already a pair of coordinates. Sometimes it works, sometimes it does not, and if it does not work, a 404 error is returned. That's not something we can control, because the location resolution is done by an external service. However, what we can control is omitting the resolution if the location is already specified as a pair of coordinates. In this case, there will be no What I propose: We can add a new option
Then you could use Would it be a solution for you? |
I would be happy with this as a solution |
Original Issue
Hello,
I'm testing wttr.in to query the weather for different GPs location. I'm a bit surprise by the behavior I've observe. It seams the API return a 404 error when the GPS location are not identical to a "known" location.
e.g.:
I would expect the coordinate
45.0,-74.0
to return something close to Montreal since it's almost the same.45.804,-74.0176
is also "close" to Montreal and return not result.Best would be to return the weather for "Saint-Jérôme" Location.
Proposed Solution
Proposed solution:
We can add a new option
geolocation
with several possible values:auto
-- try to convert, even if it is a pair of coordinates; use the coordinates as a fallback;never
-- do not try to convert; use the coordinates directly. If the location is not coordinates, return404
.always
-- always try to convert; if the location is not found, even though it is originally coordinates, return404
.Then you could use
geolocation=never
and the pair of coordinates, and it would just work.The text was updated successfully, but these errors were encountered: