Giter Site home page Giter Site logo

tl's Introduction

tl

A command line alternative to tilelive that supports streaming copies and static image rendering.

Installation

npm install -g tl
npm install -g mbtiles tilelive-file
# install any other tilelive modules you'd like to read/write from

Usage

Copy tiles from a filesystem to an MBTiles archive (assumes that tilelive-file and mbtiles are installed):

tl copy file://./tiles mbtiles://./tiles.mbtiles

Render a TM2 style for a small area into an MBTiles archive:

npm install -g mbtiles tilelive-tmstyle tilelive-mapbox tilejson \
  tilelive-vector@^0.13.0
tl copy 
  -z 6 -Z 6 -b "-124.4096 32.5343 -114.1308 42.0095" \
  tmstyle://./project.tm2/ mbtiles://./tiles.mbtiles

Render a static image using the rendered tiles:

tl render
  -z 6 -b "-123 37 -122 38" \
  mbtiles://./tiles.mbtiles \
  -o image.png

(This would also work if you used the tmstyle source, but the tiles would be rendered in the interim.)

Caveats

Some tilelive providers use other providers but don't depend on them directly (relying on tilelive.load()), so you may need to install (and --require|-r) some modules that you're not using directly.

For example, tilelive-tmstyle often loads data using tilelive-mapbox, which actually uses tilejson under the hood to do the fetching. Rendering is then done using tilelive-vector (which is declared as a peer dependency of tilelive-tmstyle, so versions may not always match up to whatever's most up-to-date).

tl's People

Contributors

crofty avatar mojodna avatar

Watchers

 avatar  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.