Simple tool to download image tiles from Google Maps via the Static-Maps API
- Give the tool two sets of latitudes and longitudes for the north-west and south-east of the area you wish to download the imagery from
- The tool calculates how many individual image tiles it needs to get from Google's Static-Maps API and begins to download them
- All image tiles are stitched together and a preview showed onscreen
- The image is also saved to a file
- A GOOGLE_MAPS_API_KEY is required as per the T&Cs of Google's Static-Maps API (plenty of tutorials online showing you how to generate this, Google it)
If you wish to download this into an existing Python environment you can us pip to install the tool like so:
pip install git+https://github.com/joseph-holland/gmaps-image-fetcher.git
pip install -r requirements.txt
If on Windows platform I've compiled a release of the tool into an exe using PyInstaller
Just download the latest release from the Release section of the repo
-
Set your GOOGLE_MAPS_API_KEY environment variable
Windows
set GOOGLE_MAPS_API_KEY=AIzaS.............
Linux
export GOOGLE_MAPS_API_KEY=AIzaS.............
-
Run the tool and give it the NW lat/lon and SE lat/lon as well as a zoom level (1= world, 20=buildings)
gmaps-image-fetcher.py -nw 53.369745 -6.348743 -se 53.348326 -6.296656 -z 16
-
The tool will calculate how many image tiles it will need to retrieve and prompt if you wish to continue
Retrieve 15 image tiles from Google static-maps API Do you want to continue y/n: y
-
It will then download the image tiles, stitch them together, show the image onscreen and save to the local directory