@mapbox/vt2geojson
Dump vector tiles to GeoJSON
Last updated 3 years ago by amishas157 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @mapbox/vt2geojson 
SYNC missed versions from official npm registry.

Dump vector tiles to GeoJSON from remote URLs or local system files.

Installation

npm install -g @mapbox/vt2geojson

Usage

Node.js

var vt2geojson = require('@mapbox/vt2geojson');

// remote file
vt2geojson({
    uri: 'http://api.example.com/9/150/194.mvt',
    layer: 'layer_name'
}, function (err, result) {
    if (err) throw err;
    console.log(result); // => GeoJSON FeatureCollection
});

// local file
vt2geojson({
    uri: './local/file/buffer.mvt',
    layer: 'layer_name',
    z: 9,
    x: 150,
    y: 194
}, function (err, result) {
    if (err) throw err;
    console.log(result); // => GeoJSON FeatureCollection
});

CLI

Usage: vt2geojson [options] URI

Options:
  -l, --layer  include only the specified layer
  -x           tile x coordinate (normally inferred from the URI)
  -y           tile y coordinate (normally inferred from the URI)
  -z           tile z coordinate (normally inferred from the URI)
  -h, --help   Show help  [boolean]

Examples:
  vt2geojson --layer state_label https://api.mapbox.com/v4/mapbox.mapbox-streets-v6/9/150/194.vector.pbf?access_token=${MAPBOX_ACCESS_TOKEN}

Current Tags

  • 1.1.5                                ...           latest (3 years ago)

6 Versions

  • 1.1.5                                ...           3 years ago
  • 1.1.4                                ...           3 years ago
  • 1.1.3                                ...           3 years ago
  • 1.1.2                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 1
Last Month 7
Dependencies (4)
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |