MVT Format
Read Mapbox Vector Tiles (.mvt / .pbf) as flattened layer features.
Overview
| Property | Value |
|---|---|
| Format id | mvt (alias pbf) |
| Class | MVTIterable |
| Extensions | .mvt, .pbf |
| Read | Yes |
| Write | No |
| Extra | mvt (mapbox-vector-tile) |
| Maturity | stable |
Record shape
{
"layer": "roads",
"geometry": {...},
"properties": {"name": "Main St"},
"type": 3,
"id": 42,
}
totals() returns the feature count across layers. The tile is decoded in memory.
Usage
from iterable import open_iterable
with open_iterable("tile.mvt") as source:
for feat in source:
print(feat["layer"], feat["properties"])
Install with pip install iterabledata[mvt].
See also
- GeoJSON — JSON geographic features
- TopoJSON — topology-encoded maps
- Supported formats