JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 301
  • Score
    100M100P100Q113584F
  • License Apache-2.0

A superficial wrapper around Mapbox's tippecanoe.

Package Exports

  • tippecanoe

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tippecanoe) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Tippecanoe

This is a trivial shell around Mapbox's Tippecanoe, a command-line tool for generating vector tiles from geometry files such as GeoJSON.

You must install Tippecanoe separately. It must be on the PATH.

Usage

const tippecanoe = require('tippecanoe');
tippecanoe([ inputFile1, inputFile2, ...], { parameters }, { options });

const tippecanoe = require('tippecanoe').tippecanoeAsync;
tippecanoeAsync([ inputFile1, inputFile2, ...], { parameters }, { options }).then(...);
  • inputFile1 etc: names of input files
  • parameters: an object consisting of camelCase keys passed to Tippecanoe as kebab-case. Each key should be in one of these formats:
    • zg: true: passed as -zg
    • maximumZoom: 'g': passed as --maximum-zoom=g
    • include: ['name', 'id']: passed as --include=name --include=id
    • namedLayer: { file: 'towns20.geojson', name: 'towns' }: passed as --named-layer='{"file":"towns20.geojson","name:"towns"}'
  • options: an object containing options for this library itself. Currently supports:
    • echo: true, to print out the command line as it is called.

Example

tippecanoe(['buildings-50k.json'], {
    zg: true,
    readParallel: true,
    simplification: 10,
    layer: 'buildings',
    output: 'buildings.mbtiles',
    description: 'Building footprints in the municipality of Hobbiton.'
}, { echo: true });