public final class MvtDecoder
- Object
- MvtDecoder
Decodes a Mapbox Vector Tile (MVT 2.1, application/x-protobuf) into the
in-memory VectorTile model using the framework’s protobuf reader
(ProtoReader).
The geometry command stream is decoded per the MVT spec: integers are
either (command | count << 3) headers or zig-zag delta-encoded
parameters; MoveTo (1) starts a part, LineTo (2) extends it and
ClosePath (7) ends a polygon ring. Coordinates are kept tile-local
(0..extent); projection to the screen happens in TileRenderer.
Methods
public static VectorTile decode(byte[] data)
throws IOException | Decodes raw tile bytes into a VectorTile. |
Inherited methods
Method details
decode
public static VectorTile decode(byte[] data)
throws IOExceptionDecodes raw tile bytes into a
VectorTile. The input must already be
decompressed (the tile sources gunzip transparently).