Giter Site home page Giter Site logo

gmaps-image-fetcher's Introduction

GMaps Image Fetcher

Simple tool to download image tiles from Google Maps via the Static-Maps API

preview image

How it works

  • 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

Installation

Prerequisites

  • 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)

Existing Python environment

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

Windows executable

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

Running

  1. Set your GOOGLE_MAPS_API_KEY environment variable

    Windows

    set GOOGLE_MAPS_API_KEY=AIzaS.............

    Linux

    export GOOGLE_MAPS_API_KEY=AIzaS.............
  2. 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
  3. 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
  4. It will then download the image tiles, stitch them together, show the image onscreen and save to the local directory

    satellite sample

gmaps-image-fetcher's People

Contributors

joseph-holland avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

gmaps-image-fetcher's Issues

Adding scale=2 support

If we change scale=2, stiches are not glued properly.

A good feature would be if we could pass scale value as a parameter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.