GithubHelp home page GithubHelp logo

grseb9s / maps_stitcher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haochi/maps_stitcher

0.0 1.0 0.0 17 KB

Downloads Google Maps tiles and stitches them into an image

License: GNU General Public License v2.0

Python 100.00%

maps_stitcher's Introduction

Maps Stitcher

Downloads and generates an image of a map given a latitude and longitude bounds.

You can find some sample output on Flickr here.

Environment

Running this script requires Python, plus some libraries. You can see the dependencies in the requirements.txt file.

It's test with Python 2.7.6 inside virtualenv

Usage

There are three steps to generate the image:

  • Initialize the project with the latitude and longitude bounds (plus some other configurations)
  • Download the necessary tiles with your Google API key
  • Stitch the tiles into the final image

The corresponding commands are (example):

  • maps_stitcher.py init PROJECT_NAME: This will create a folder by the given project name in the current working directory.

    • --southwest: (required, comma separated latitude and longitude pair) south west bound
    • --northeast: (required, comma separated latitude and longitude pair) north east bound
    • --zoom: (optional, integer, default=1) zoom level, [1, 21+]
    • --scale: (optional, integer, default=1) scale, (1, 2, 4)
    • --size: (option, integer, default=640) size, [1, 2048]
    • --format: (optional, string, default=gif) Image format (supported formats)
    • --maptype: (optional, string, default=roadmap) Map type (supported formats)
  • maps_stitcher.py download PROJECT_NAME: This will start downloading the tiles

  • maps_stitcher.py stitch PROJECT_NAME: This will stitch the tiles and generate the map

    • --save: (optional, string, default=output.gif) File name
    • --format: (optional, string, default=gif) File format (supported formats)

Example

  • ./maps_stitcher.py init san_francisco --southwest=37.708894,-122.502316 --northeast=37.808034,-122.358378 --zoom=15 --scale=2
  • ./maps_stitcher.py download san_francisco --key=ABCDEFG
  • ./maps_stitcher.py stitch san_francisco --output=sf.jpg

maps_stitcher's People

Contributors

haochi avatar jakublipinski avatar

Watchers

 avatar

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.