When I search for a place on google maps, an area precisely, is highlighted on the map, I would like to get the whole set of latitudes and longitudes that make up this area, how can I get them via API? or is there another way or service?
CodePudding user response:
You can use openstreetmap.com:
- Search for the area on openstreetmap
- Copy-paste the relation number in http://polygons.openstreetmap.fr/index.py
- Select the correct poly from the list
- Save as .txt file: each line in the file contains the long and lat coordinates of a geopoint: all geopoints together form the border of the shape (aka the area)