Answer the question
In order to leave comments, you need to log in
Where to get the coordinate boundaries of cities?
Hello. The boundaries of every city in the world can be represented as a polygon. So does 2gis, for example. How to get the coordinates of the borders, so that later the application understands and determines in which city it is located by geolocation?
ps detection by IP is not used
Answer the question
In order to leave comments, you need to log in
To get polygons of cities from OpenStreetMap, you can use overpass-turbo.eu (site api is blocked, use VPN)
Request for the Moscow region:
[out:xml];
area
(area.region)
["boundary"="administrative"]
["name"="Московская область"]
->.a;
(
node
(area.a)
["place"~"city|town"];
way
(area.a)
["place"~"city|town"];>;
relation
(area.a)
["place"~"city|town"];>;
)->.b;
.b out meta qt;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question