open-vector-tile

About
A Modified TypeScript implementation of the Mapbox Vector Tile library. It is backwards compatible but offers a lot of new features and improvements including (but not limited to):
- Proper module treeshake.
- Pre-Tessellated & Indexed geometries to quickly ship data to the renderer.
- Support for 3D geometries.
- Support for M-Values for each geometry point (used by lines and polygons).
- M-Values are stored as "Shapes" which reuses objects only needing to do lookups on values.
- Column encoding of data to make it more compact. Better gzip and brotli compression.
- Support nested objects in properties.
Inspiration
A very talented Markus Tremmel came up with the idea of migrating away from a row based approach to a column based approach with his COVTiles. I wanted to test the idea of simplifying his approach and see if it was worth the effort. Once I saw I got better results post compression I decided to finish this project.
Install
#bun
# pnpm
# yarn
# npm
# cargo
Example use
const fs = from 'fs'
import from 'open-vector-tile'
// assume you can read (.pbf | .mvt | .ovt)
const fixture = fs.
// load the protobuf parsing it directly
const tile =
console.log
// example layer
const = tile.
// grab the first feature
console.log
console.log
Development
Requirements
You need the tool tarpaulin to generate the coverage report. Install it using the following command:
The bacon coverage tool is used to generate the coverage report. To utilize the pycobertura package for a prettier coverage report, install it using the following command:
Running Tests
To run the tests, use the following command:
# TYPESCRIPT
## basic test
## live testing
# RUST
## basic test
# bacon
Generating Coverage Report
To generate the coverage report, use the following command:
# bacon