Sorry, you need to enable JavaScript to visit this website.

Schema

 

Service version: 1.0
Last edit: 2019.02.01

On this page

Purpose

Vector tiles are served in binary format which uses protocol buffers as the method of serializing structured data. The following diagram shows dependencies between the properties of vector tile.

vector tile property dependencies

Legend

Tile
Represents a vector tile as a whole entity. It consists of TileLayers.
TileLayer
As a part of Tile, this represents one of the layers that can be later rendered e.g., a layer which consists of all Parks, Roads, Build up areas, and Points of interest.
TileFeatures
This is basically geometry stored as an array which defines how a feature looks. It also contains labels for roads or POIs.
TileValue
A string, integer, floating point number, or boolean value. Keys of TileLayer and tags of TileFeature create relations between TileValue and TileFeature which includes specified TileValue (e.g., road label - TileValue - attached to road geometry - TileFeature).

Schema data

Formally, the structure of vector tile is described by the protocol buffer schema. It allows the generation of C++, Java, Python, Go, Ruby, Objective-C and C# code based on proto file. The Proto file used by TomTom is compatibile with the one used by Mapbox.

package vector_tile;

option optimize_for = LITE_RUNTIME;

message Tile {

    enum GeomType {
        UNKNOWN = 0;
        POINT = 1;
        LINESTRING = 2;
        POLYGON = 3;
    }

    message Value {
        optional string string_value = 1;
        optional float float_value = 2;
        optional double double_value = 3;
        optional int64 int_value = 4;
        optional uint64 uint_value = 5;
        optional sint64 sint_value = 6;
        optional bool bool_value = 7;
        extensions 8 to max;
    }

    message Feature {
        optional uint64 id = 1 [ default = 0 ];
        repeated uint32 tags = 2 [ packed = true ];
        optional GeomType type = 3 [ default = UNKNOWN ];
        repeated uint32 geometry = 4 [ packed = true ];
        optional bytes raster = 5;
    }

    message Layer {
        required uint32 version = 15 [ default = 1 ];
        required string name = 1;
        repeated Feature features = 2;
        repeated string keys = 3;
        repeated Value values = 4;
        optional uint32 extent = 5 [ default = 4096 ];

        extensions 16 to max;
    }

    repeated Layer layers = 3;

    extensions 16 to 8191;
}

▲ Return to top