M
M
Mind20772021-08-20 13:37:10
Python
Mind2077, 2021-08-20 13:37:10

How to determine the user's city name?

I am writing code to view the weather forecast in the current location using the Pyowm library. I would like to know the name of the user's city automatically, to check the weather forecast and display up-to-date information. I can't figure out how to determine the name of the city based on the fact that I have the coordinates

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tantumus21, 2021-08-20
@tantumus21

through geolocation. I have never experienced this personally, but this article describes what you need

P
pfg21, 2021-08-20
@pfg21

reverse geocoding - issuance of address information at the requested coordinates.
https://habr.com/ru/post/505500/
https://nominatim.openstreetmap.org/ui/reverse.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question