5.1.1 • Published 8 years ago

mapbox-tile-copy v5.1.1

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

mapbox-tile-copy

A shortcut from local geodata files to tiles on S3

Build Status

Installation

$ npm install -g mapbox-tile-copy

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>

Your s3 url template must include a {z}/{x}/{y} scheme for writing and distributing tiles. File extensions are not required.

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}

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}

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

The --part operation is explicitly zero-indexed because this gives tilelive's stream processors a predictable way to segment tiles per part. For example, the following will distribute all tiles among a single part. So all tiles will be rendered by this single part:

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

The following example will distribute tiles to the second part out of 5 total parts:

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

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.

5.1.1

8 years ago

5.1.0

8 years ago

5.0.1

8 years ago

5.0.0

8 years ago

4.8.1

8 years ago

4.8.0

8 years ago

4.7.1

8 years ago

4.7.0

8 years ago

4.6.2

8 years ago

4.6.1

8 years ago

4.6.0

8 years ago

4.5.0

8 years ago

4.4.0

8 years ago

4.3.2

8 years ago

4.3.1

8 years ago

4.3.0

8 years ago

4.2.0

8 years ago

4.1.2

8 years ago

4.1.1

8 years ago

4.1.0

8 years ago

4.0.0

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.7.0

8 years ago

2.6.3

8 years ago

2.6.2

8 years ago

2.6.1

8 years ago

2.6.0

8 years ago

2.5.1

9 years ago

2.5.0

9 years ago

2.4.2

9 years ago

2.4.1

9 years ago

2.4.0

9 years ago

2.3.0

9 years ago

2.2.0

9 years ago

2.1.0

9 years ago

2.1.0-alpha1

9 years ago

2.1.0-alpha

9 years ago

2.0.0

9 years ago

1.4.16

9 years ago

1.4.15

9 years ago

1.4.14

9 years ago

1.4.13

9 years ago

1.4.12

9 years ago

1.4.11

9 years ago

1.4.10

9 years ago

1.4.9

9 years ago

1.4.8

9 years ago

1.4.7

9 years ago

1.4.6

9 years ago

1.4.5

9 years ago

1.4.4

9 years ago

1.4.3

9 years ago

1.4.2

9 years ago

1.4.1

9 years ago

1.4.0

9 years ago

1.3.1

9 years ago

1.3.0

9 years ago

1.2.0

9 years ago

1.1.4

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago