Coder Social home page Coder Social logo

mapbox-tile-copy's Introduction

mapbox-tile-copy

A shortcut from local geodata files to tiles on S3

Build Status

Configuration

You'll be writing to S3, and so you'll need to make sure that your shell environment is configured with appropriate credentials.

Usage

$ mapbox-tile-copy <file> <s3 url template>

Examples:

Copy tiles from an mbtiles file to a folder in my-bucket:

$ mapbox-tile-copy ~/data/my-tiles.mbtiles s3://my-bucket/folder/mbtiles/{z}/{x}/{y}

Convert a GeoJSON file into vector tiles:

$ mapbox-tile-copy ~/data/my-data.geojson s3://my-bucket/folder/geojson/{z}/{x}/{y}

Copy tiles from one S3 location to another via tilejson describing the source:

$ mapbox-tile-copy ~/data/online-data.tilejson s3://my-bucket/folder/tilejson/{z}/{x}/{y}

Perform a part of a copy operation. Useful for parallel processing a large file:

$ mapbox-tile-copy ~/data/my-tiles.mbtiles s3://my-bucket/parallel/{z}/{x}/{y} --part 2 --parts 12

Render image tiles from vector tiles, using custom fonts from a location on your computer:

$ MapboxTileCopyFonts=/path/to/font/dir mapbox-tile-copy ~/style.tm2z s3://my-bucket/pngs/{z}/{x}/{y}

Supported file types

  • .mbtiles
  • .tilejson
  • .tm2z
  • .kml
  • .geojson
  • .gpx
  • .csv
  • .shp
  • .tif
  • .vrt
  • serialtiles

Running tests

Tests involve copying files to S3. You can bring your own bucket by specifying a TestBucket environment variable.

$ TestBucket=my-bucket npm test

If you don't specify a bucket, it will attempt to write to a private Mapbox bucket, and will fail if your environment is not configured with appropriate credentials.

mapbox-tile-copy's People

Contributors

alianthes avatar camillacaros avatar dnomadb avatar jakepruitt avatar rclark avatar tmcw avatar willwhite avatar yhahn 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.