tscombine

The tscombine plugins allows to load tiles from various tile stores depending on the location and zoom level.

Setup

  1. Configure the map source, type and format:

    plugins = ${plugins}, tscombine
    
    map.location = /path/to/tilestore-combine.cfg
    map.type = combine
    
  2. Place the configuration in /path/to/tilestore-combine.cfg:

    layers = base, germany
    
    layers {
        base {
            # From level 0 until 10
            levels = 0:10
            types = mbtiles
            location = /home/data/maps/world-11/world-11.mbtiles
        }
    
        germany {
            # Bounding box of germany
            regions = +45.967+5.867+55.133+15.033
            # From level 11 to level 16
            levels = 11:19
            type = osm
            location = https://tile.openstreetmap.org/%l/%c/%r.png
        }
    }
    

Each layer defines a geographical region where a particular tile store should be used. Furthermore the tile level range has to be provided. The type (see also map.type) and the location (see also map.location) have to be provided as well.

If region is omitted then the entire world is assumed. If type is omitted then the default directory store is assumed.

The algorithm serves tiles from the first tile store in the list that matches the request.

Module configuration

layers

Type: list:string

Define the layers to be activated. Each layer must be configured separately, see below.

layers.$name.levels

Type: integer range

A zoom level range for this layer. The format is [min]:[max] which defines a range including both min and max.

layers.$name.type

Type: string

The type of the tile store to be used. This is related to map.type. If type is omitted (unset, not just empty) then the default SeisComP tile store is being used which searches for files in a directory following a configured pattern.

layers.$name.location

Type: string

The location of the tile store. This is related to map.location.

layers.$name.regions

Type: list:string

A list of geographical regions this tile store should be used for. Each region is defined as [lat_dim]x[lon_dim]+lat0+lon0 or +lat0+lon0+lat1+lon1.

layers.$name.rects

Type: list:string

A list of index rects with respect to the minimum zoom level this tile store should be used for. Each rect is defined as [cols]x[rows]+col0+row0 or +col0+row0+col1+row1.

The number of rows and columns of the minimum zoom level can be calculated as 2^level. The rect is defined with respect to this extent.

If layers.$name.regions is defined then this value is not being read.