tscombine

The tscombine plugin allows to load map tiles from mutitple tile stores depending on geografic location and zoom level. The plugin ships with the gempa package “mapprojections”.

A list of layers can be defined defining map sources for specific regions and zoom levels. tscombine will load tiles from the first tile store in the list that matches the request. The layer-specific module configuration parameters layers.$name.type and layers.$name.location define the map sources along with layers.$name.levels. The type parameter and the region definition (layers.$name.regions or layers.$name.rects) are optional. If the region definition is omitted, then the entire world is assumed. If type is omitted, then the default directory store defined in the global parameter map.location is assumed.

When using maps from mbtiles [6] or OpenStreetMap [2] Tile servers [4], the plugin mbtiles must be made available. mbtiles is also made available with “mapprojections”.

Setup

  1. Add the mbtiles and tscombine plugins to the list of plugins (global module configuration parameter), e.g., global.cfg:

    plugins = ${plugins}, mbtiles, tscombine
    
  2. Configure the map location and type (global module configuration parameters configurable in scconfig), e.g., global.cfg. Here, location defines a configuration file containing all layer parameters specific to tscombine:

    map.location = @SYSTEMCONFIGDIR@/tilestore-combine.cfg
    map.type = combine
    
  3. Place the layer configurations in the file defined above, e.g., @SYSTEMCONFIGDIR@/tilestore-combine.cfg:

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

Note

When using type = osm, then additional global parameters provided with the mbtiles plugin should be considered, e.g., map.osm.cacheDir and map.osm.cacheDuration. They can be configured with scconfig.

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. lat_dim and lon_dim are the dimensions in the directions of latitude and longitude in unit of degree, lat1 and lon1 define the region origin.

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.