Skip to main content

Module tile

Module tile 

Source
Expand description

Tiles’ ids and data: unwrapped and overscaled tile ids around mln_style::tile_id’s canonical one, and tile ranges (tile_id, tile_range); the layers and features of vector tiles, and the geometry functions that work on them; and DEM data (dem_data).

  • TileData: a tile’s data, which is an MVT tile read lazily with fast-mvt, an MLT tile decoded with mlt-core, or features already in tile coordinates (GeoJSON and custom geometry sources). Its layers (TileLayer) and features (Feature) are views that borrow it.
  • geometry_tile_data: hole limits, polygon fixup on i_overlay, feature conversion and corner rounding. The feature interface that the tiles implement, ring classification and coordinate conversion are in mln_style::feature.

Modules§

cut
Tiles deeper than their tileset’s last zoom, cut from its tiles there.
dem
The height rule of raster-dem sources: how a DEM texel decodes to meters, and how terrain reads a height between texels. The shaders follow it in the same f32 operations, in the same order: hillshade’s and color relief’s decode texels as DemUnpack::decode does, and terrain’s read heights as sample does at its mesh’s vertices. So the CPU reads the heights the GPU draws at the vertices, bit for bit; between them the surface is linear across each quad, which spans a DEM tile’s size / 256 pixels or fewer, 2 for 512 px tiles. mln_engine’s conformance case terrain_heights checks each backend against sample.
feature
geometry_tile_data
tile_range

Structs§

FeatureGroups
TileLayer::group_features.
MltFeature
A feature of an MltLayer.
MltLayer
A layer of an MltTile.
MltTile
MapLibre Tile data. Cloning shares the bytes and the decoded layers.
MvtFeature
A feature of an MvtLayer, whose tags are known to be well formed.
MvtLayer
A layer of an MvtTile, decoded.
MvtTile
Mapbox Vector Tile data. Cloning shares the bytes and the layers found in them.
OverscaledTileID
Has integer z/x/y coordinates. overscaled_z describes the zoom level this tile is intended to represent, e.g. when parsing data. z is never larger than the source’s maxzoom.
UnwrappedTileID
Has integer z/x/y coordinates. wrap describes tiles that are left/right of the main tile pyramid, e.g. when wrapping the world. Used for describing what position tiles are getting rendered at (= calc the matrix). z is never larger than the source’s maxzoom.

Enums§

Feature
A feature of a TileLayer. Expressions and buckets read it as a GeometryTileFeature.
TileData
The data of a vector tile. Cloning is cheap: each kind shares what it is made from, and what has been decoded of it.
TileLayer
A layer of a TileData.

Type Aliases§

GeoJsonFeature
A feature in tile coordinates, as GeoJSON and custom geometry sources cut them.