-
Notifications
You must be signed in to change notification settings - Fork 175
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
airpollutionapi30 has incorrectly swapped latitude and longitude #387
Comments
Haaaa good catch! A classic human error ;-) @davidpirogov would you feel like directly proposing a pull request for this? If so, please also include a unit-test to "fix the fix" Thanks!! |
davidpirogov
added a commit
to davidpirogov/pyowm
that referenced
this issue
Jan 24, 2022
@csparpa done! |
davidpirogov
added a commit
to davidpirogov/pyowm
that referenced
this issue
Jan 26, 2022
Closed with #390 |
Merged
csparpa
added a commit
that referenced
this issue
Feb 14, 2022
# New features [380](#380) Implemented [National Weather Alerts](https://openweathermap.org/api/one-call-api#listsource) support [376](#376) Now PyOWM uses SQLite instead of files to internally store city data. `CityIDRegistry` interface has changed but in a retrocompatible way # Chores [381](#381) Now it is possible to specify how many times to retry an API call # Bugfixes [379](#379) Experimental fix for `404` errors on Agromonitor API satellite image search [387](#387) Fixed lat/lon swap bug on Airpollution API [389](#389) Fixed wrong city name in City ID database
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fairly straightforward bug that fails in locations greater than plus-minus 90 degrees longitudinal, such as Melbourne, Australia (place id 2158177, 'lon': 144.9633, 'lat': -37.814)
The offending code is in the lines below:
pyowm/pyowm/airpollutionapi30/airstatus.py
Lines 91 to 92 in 0474b61
Simple fix to swap the dictionary keys so that the
lat
variable refers tofloat(the_dict['coord']['lat'])
and that thelon
variable refers tofloat(the_dict['coord']['lon'])
The text was updated successfully, but these errors were encountered: