Code Monkey home page Code Monkey logo

tile-stitch's Introduction

tile-stitch

Stitch together and crop map tiles for any bounding box.

The tiles should come from a web map service in PNG or JPEG format, and will be written out as PNG.

Examples

To get standard OpenStreetMap tiles at zoom level 10 for the area of the Exploratorium's Bay Model video projection:

$ ./stitch -o baymodel.png -- 37.371794 -122.917099 38.226853 -121.564407 10 http://a.tile.openstreetmap.org/{z}/{x}/{y}.png

To get the MapQuest Open Aerial imagery at zoom level 11 to match the "See Something or Say Something" bounding box of London:

$ ./stitch -o london.png -- 51.316252 -0.366258 51.606525 0.099606 11 http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg

To get a 640x480 image from Stamen's watercolor map at zoom level 10 around Tokyo:

$ ./stitch -o tokyo.png -c -- 35.6824 139.7531 640 480 10 http://b.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg

Format

The arguments are minlat minlon maxlat maxlon zoom url. If you don't specify -o outfile the PNG will be written to the standard output. URLs should include {z}, {x}, and {y} tokens for tile zoom, x, and y.

The -- is to keep getopt, especially GNU getopt, from interpreting the minus signs in latitudes or longitudes as option flags.

Requirements

  • pkg-config
  • libcurl to retrieve the tiles
  • libjpeg >= 8 for jpeg_mem_src
  • libpng

Installation

To install on Ubuntu do:

sudo apt-get update
sudo apt-get install git build-essential pkg-config libcurl4-openssl-dev libpng-dev libjpeg-dev
git clone [email protected]:ericfischer/tile-stitch.git
cd tile-stitch
make

tile-stitch's People

Contributors

e-n-f 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.