Concepts
Tiling schemes and parameters¶
Raster tiles¶
When you use TilingWriter
you have to specify a collection of so called "tiling schemes". Each tiling scheme has some required and some optional properties:
Name | Required | Type | Description |
---|---|---|---|
schemeId | ✅ | string | User provided identifier that will be later used to retrieve the tiles for the given scheme |
schemeType | Enum/string | Designates the standard for generated tiles. By default WMTS standard is used (value 'WMTS'). Use value 'XYZ' if you want to produce tiles in the WebMercator projection, to be used with the x/y/z endpoint. In case of XYZ tiles the only supported size is 256x256 as of 15-09-2020. | |
outputType | ✅ | Enum/string | One of [RawData, BinnedData256, PNG, WEBP] Type of output - the tiles will be generated/rendered into this format |
itemName | string | Name of the item to be used as the datasource (in case a single item is to be used as the data source). Either itemName or itemBandMapping must be provided. |
|
itemBandMapping | json array | Collection of objects describing mapping of items to bands in the output raster (see 'Windy' example). Either itemName or itemBandMapping must be provided. |
|
aggregationMethod | ✅ | Enum/string | One of [Mean, Max] Method for aggregating pixels when zoom is applied |
tileWidth | ✅ | int | width of the resulting tile in pixels |
tileHeight | ✅ | int | height of the resulting tile in pixels |
zoomLevels | int[] | Specific zoom levels to generate. If omitted, all levels are generated. 0 is the top-most zoom level (least level of detail) | |
minValue | double | If outputType is something else other than RawData, this value is used to transform the data into bins or colors. Therefore it is mandatory for these output types (unless it is specified within itemBandMapping ) |
|
maxValue | double | If outputType is something else other than RawData, this value is used to transform the data into bins or colors. Therefore it is mandatory for these output types (unless it is specified within itemBandMapping ) |
|
renderValuesOutOfRangeAsTransparent | Enum/string | Render values out of range of minValue and maxValue as transparent. Allowed values are None , Above , Below , AboveAndBelow . Default is None so values out of range will be coloured with color for minimum and maximum, respectively. |
|
colors | string[] | For rendering into images (PNG/WEBP) the color palette can be specified here. The colors are represented as hexadecimal RGB(A) strings, such as #ABC, #AABBCCDD and so on | |
maxRasterWidth | int | For raster rendering of meshes this is a required field that specifies the width of base raster (the mesh will be rasterized with this width, and the result will be used as a base raster for tiling) | |
layerIdx | int | In case the underlying dataset/item is defined with many layers, and for the purposes of visualization only a single layer is needed, this parameter can be used to specify which layer to use. | |
compressionLevel | int | Currently supported only for PNG output type where it represents the zlib compression level. Zlib has 10 compression levels (0-9). Different levels have different compression performance in terms of compression ratio and speed. Level 0 means no compression, zlib will output the original data. Level 1 is the fastest, while it has low compression ratio. Level 9 gives the highest compression ratio, but the compression speed is slower. The default compression level for tiling is set to 4. |
Vector tiles¶
None of the above parameters apply for map vector tiles. Map vector tiles writer and update writer takes only a zip archive of vector tiles in '.pbf' format and in the map vector tiles folder structure.
Limitations¶
- The tiles end up being generated in the coordinate system of the underlying dataset - no projections are supported at this point, unless the tiles are to be generated in XYZ format. In that case the data will be projected into EPSG:3857.