pbf-introspect
v1.0.1
Published
What is in this PBF tile? Let's find out!
Readme
pbf-introspect
What is in this PBF tile? Let's find out! pbf-introspect is a CLI tool to inspect Mapbox Vector Tile PBF files, providing a structured overview of layers, classes, and properties. What a vibe.
It uses the pbf and @mapbox/vector-tile libraries to parse the binary data and extract feature properties, making it easier to debug tile contents and verify data distribution.
Note: To keep the output sensible, pbf-introspect only lists individual property values if there are fewer than 20 unique values for that property.
Running
The easiest way to use pbf-introspect is via npx:
npx pbf-introspectUsage
Inspect a local file
This will create test/tile.md by default.
npx pbf-introspect test/tile.pbfInspect a URL
This will print to console by default.
npx pbf-introspect https://example.org/tile.pbfOptions
| Option | Description |
| --------------------- | --------------------------------------------------------- |
| -f, --format <type> | Output format: json or markdown (default: markdown) |
| -o, --output <path> | Output destination: stdout or a specific file path |
| -V, --version | Output the version number |
| -h, --help | Display help |
Development
# Install dependencies
npm install
# Run tests
npm test
# Run the CLI locally
node . test/2372.pbfLicense
ISC
