TileGeneration Configuration Reference

TileCloud-chain configuration

https://raw.githubusercontent.com/camptocamp/tilecloud-chain/master/tilecloud_chain/schema.json

type

object

properties

  • defaults

Defaults

Used to put YAML references

type

object

  • grids

Grids

The WMTS grid definitions by grid name, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#configure-grids

type

object

additionalProperties

Grid

  • caches

Caches

The tiles caches definitions by name, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#configure-caches

type

object

additionalProperties

Cache

  • layers

Layers

The layers definitions by name, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#configure-layers

type

object

additionalProperties

Layer

  • process

Process

List of available commands by name, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#process

type

object

additionalProperties

Process command

  • generation

Generation

  • sqs

SQS

The Simple Queue Service configuration

type

object

properties

  • queue

Queue

The queue name

type

string

default

tilecloud

  • region

AWS region

additionalProperties

False

  • sns

SNS

The Simple Notification Service configuration, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#configure-sns

type

object

properties

  • topic

Topic

The topic

type

string

  • region

AWS region

additionalProperties

False

  • queue_store

Queue store

The used queue store

type

string

enum

redis, sqs, postgresql

default

redis

  • redis

Redis

  • postgresql

PostgreSQL

  • openlayers

OpenLayers

Configuration used to generate the OpenLayers example page

type

object

properties

  • srs

SRS

The projection code

type

string

pattern

^EPSG:[0-9]+$

default

EPSG:2056

  • proj4js_def

Proj4js definition

The proj4js definition, get it from https://epsg.io/

type

string

default

+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs

  • center_x

Center x

The center easting

type

number

default

2600000

  • center_y

Center y

The center northing

type

number

default

1200000

  • zoom

Map initial zoom

The initial zoom

type

number

default

3

additionalProperties

False

  • server

Server

  • cost

Cost

  • metadata

Metadata

  • provider

Provider

  • logging

Logging

  • authentication

Authentication

The authentication configuration

type

object

properties

  • github_repository

GitHub repository

The GitHub repository name, on witch one we will check the access rights

type

string

  • github_access_type

GitHub access

The kind of rights the user should have on the repository

type

string

enum

push, pull, admin

default

pull

additionalProperties

False

additionalProperties

False

Headers

The headers that we send to the WMS backend

type

object

additionalProperties

The header value

type

string

Grid

The WMTS grid definition, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#configure-grids

type

object

properties

  • resolution_scale

Resolution scale

The scale used to build a FreeTileGrid typically ‘2’

type

integer

  • resolutions

Resolutions

The resolutions in pixel per meter

type

array

items

type

number

  • bbox

Bounding box

The bounding box in meter

type

array

maxLength

4

minLength

4

items

type

number

  • srs

SRS

The projection reference

type

string

pattern

^EPSG:[0-9]+$

  • proj4_literal

Proj4 literal

The Proj4 definition

type

string

  • unit

Unit

The projection unit

type

string

default

m

  • tile_size

Tile size

The tile size in pixel

type

integer

default

256

  • matrix_identifier

Matrix identifier

The identifier to use in the tiles URL, recommend to be resolution (default)

type

string

enum

zoom, resolution

default

zoom

additionalProperties

False

Cache WMST capabilities file

The generated WMTS capabilities file name

type

string

default

1.0.0/WMTSCapabilities.xml

Cache HTTP URL

The HTTP URL %host will be replaces by one of the hosts

type

string

Cache host

The host used to build the HTTP URLs

type

array

items

type

string

Cache HTTP URLs

type

array

items

type

string

Cache folder

The root folder of the cache

type

string

default

Cache filesystem

type

object

properties

  • type

const

filesystem

  • wmtscapabilities_file

Cache WMST capabilities file

  • http_url

Cache HTTP URL

  • hosts

Cache host

  • http_urls

Cache HTTP URLs

  • folder

Cache folder

additionalProperties

type

string

Cache S3

type

object

properties

  • type

const

s3

  • wmtscapabilities_file

Cache WMST capabilities file

  • http_url

Cache HTTP URL

  • hosts

Cache host

  • http_urls

Cache HTTP URLs

  • tiles_url

Tiles URL

The template tiles URL on S3, the argument can be region, bucket and folder

type

string

default

http://s3-{region}.amazonaws.com/{bucket}/{folder}

  • host

Host

The S3 host

type

string

default

s3-eu-west-1.amazonaws.com

  • bucket

Bucket

The S3 bucker name

type

string

  • region

AWS region

  • cache_control

Cache control

The Cache-Control used to store tiles on S3

type

string

  • folder

Cache folder

additionalProperties

type

string

Cache Azure

Azure Blob Storage

type

object

properties

  • type

const

azure

  • wmtscapabilities_file

Cache WMST capabilities file

  • http_url

Cache HTTP URL

  • hosts

Cache host

  • http_urls

Cache HTTP URLs

  • folder

Cache folder

  • container

Container

The Azure container name

type

string

  • cache_control

Cache control

The Cache-Control used to store tiles on Azure

type

string

additionalProperties

type

string

Cache MBtiles

type

object

properties

  • type

const

mbtiles

  • wmtscapabilities_file

Cache WMST capabilities file

  • http_url

Cache HTTP URL

  • hosts

Cache host

  • http_urls

Cache HTTP URLs

  • folder

Cache folder

additionalProperties

type

string

Cache BSDDB

type

object

properties

  • type

const

bsddb

  • wmtscapabilities_file

Cache WMST capabilities file

  • http_url

Cache HTTP URL

  • hosts

Cache host

  • http_urls

Cache HTTP URLs

  • folder

Cache folder

additionalProperties

type

string

Cache

The tiles cache definition, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#configure-caches

anyOf

Cache filesystem

Cache S3

Cache Azure

Cache MBtiles

Cache BSDDB

Layer title

The title, use to generate the capabilities

type

string

Layer grid

The used grid name

type

string

Layer bounding box

The bounding box where we will generate the tiles

type

array

maxLength

4

minLength

4

items

type

number

layer min resolution seed

The minimum resolutions to pre-generate

type

number

Layer pixel buffer

The buffer in pixel used to calculate geometry intersection

type

integer

default

0

Layer meta

Use meta-tiles, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#meta-tiles

type

boolean

default

False

Layer meta size

The meta-tile size in tiles

type

integer

default

5

Layer meta buffer

The meta-tiles buffer in pixels

type

integer

default

128

Layer layers

The WMS layers

type

string

Layer WMTS style

The WMTS style

type

string

pattern

^[a-zA-Z0-9_\-\+~\.]+$

Layer MIME type

The MIME type of the tiles

type

string

pattern

^[a-zA-Z0-9!#$%^&\*_\-\+{}\|’.`~]+/[a-zA-Z0-9!#$%^&\*_\-\+{}\|’.`~]+$

Layer extension

The layer extension

type

string

Layer dimension name

The dimension name

type

string

pattern

^(?!(?i)(SERVICE|VERSION|REQUEST|LAYERS|STYLES|SRS|CRS|BBOX|WIDTH|HEIGHT|FORMAT|BGCOLOR|TRANSPARENT|SLD|EXCEPTIONS|SALT))[a-z0-9_\-~\.]+$

layer dimensions

The WMTS dimensions

type

array

items

type

object

properties

  • name

Layer dimension name

  • generate

Generate

The values that should be generate

type

array

items

type

string

pattern

^[a-zA-Z0-9_\-\+~\.]+$

  • values

Values

The values present in the capabilities

type

array

items

type

string

pattern

^[a-zA-Z0-9_\-\+~\.]+$

  • default

Default

The default value present in the capabilities

type

string

pattern

^[a-zA-Z0-9_\-\+~\.]+$

additionalProperties

False

Layer legends

The provided legend

type

array

items

type

object

properties

  • mime_type

MIME type

The mime type used in the WMS request

type

string

pattern

^[a-zA-Z0-9!#$%^&\*_\-\+{}\|’.`~]+/[a-zA-Z0-9!#$%^&\*_\-\+{}\|’.`~]+$

  • href

Href

The URL of the legend image

type

string

  • width

Width

The width of the legend image

type

string

  • height

Height

The height of the legend image

type

string

  • min_scale

Min scale

The max scale of the legend image

type

string

  • max_scale

Max scale

The max scale of the legend image

type

string

  • min_resolution

Min resolution

The max resolution of the legend image

type

string

  • max_resolution

Max resolution

The max resolution of the legend image

type

string

additionalProperties

False

Layer legend MIME

The mime type used to store the generated legend

type

string

pattern

^[a-zA-Z0-9!#$%^&\*_\-\+{}\|’.`~]+/[a-zA-Z0-9!#$%^&\*_\-\+{}\|’.`~]+$

Layer legend extension

The extension used to store the generated legend

type

string

pattern

^[a-zA-Z0-9]+$

Layer pre hash post process

Do an image post process before the empty hash check

type

string

Layer post process

Do an image post process after the empty hash check

type

string

Layer geometries

The geometries used to determine where we should create the tiles, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#configure-geomsql

type

array

items

type

object

properties

  • connection

Connection

The PostgreSQL connection string

type

string

  • sql

SQL

The SQL query that get the geometry in geom e.g. the_geom AS geom FROM my_table

type

string

  • min_resolution

Min resolution

The min resolution where the query is valid

type

number

  • max_resolution

Max resolution

The max resolution where the query is valid

type

number

additionalProperties

False

Layer empty tile detection

The rules used to detect the empty tiles, use generate-tiles –get-hash to get what we can use, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#configure-hash

type

object

properties

  • size

Title

The tile size

type

integer

  • hash

Hash

The tile hash

type

string

additionalProperties

False

Layer empty meta-tile detection

The rules used to detect the empty meta-tiles, use generate-tiles –get-hash to get what we can use, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#configure-hash

type

object

properties

  • size

Size

The meta-tile size

type

integer

  • hash

Hash

The meta-tile hash

type

string

additionalProperties

False

Layer cost

The rules used to calculate the cost

type

object

properties

  • tileonly_generation_time

tile only generation time

The time to generate a tile without meta-tile

type

number

default

40

  • tile_generation_time

tile generation time

The time to generate a tile from the meta-tile

type

number

default

30

  • metatile_generation_time

Meta tile generation time

The time to generate a meta-tile

type

number

default

30

  • tile_size

Cost tile size

The tile mean size in bytes

type

number

default

20

additionalProperties

False

Layer WMS

type

object

properties

  • type

const

wms

  • title

Layer title

  • grid

Layer grid

  • bbox

Layer bounding box

  • min_resolution_seed

layer min resolution seed

  • px_buffer

Layer pixel buffer

  • meta

Layer meta

  • meta_size

default

5

Layer meta size

  • meta_buffer

default

128

Layer meta buffer

  • layers

Layer layers

  • wmts_style

Layer WMTS style

  • mime_type

Layer MIME type

  • extension

Layer extension

  • dimensions

layer dimensions

  • legends

Layer legends

  • legend_mime

Layer legend MIME

  • legend_extension

Layer legend extension

  • pre_hash_post_process

Layer pre hash post process

  • post_process

Layer post process

  • geoms

Layer geometries

  • empty_tile_detection

Layer empty tile detection

  • empty_metatile_detection

Layer empty meta-tile detection

  • cost

Layer cost

  • url

URL

The WMS service URL

type

string

  • generate_salt

Generate salt

Should generate a salt to drop the cache

type

boolean

default

False

  • query_layers

Query layers

The layers use for query (To be used with the server)

type

string

  • info_formats

Info formats

The query info format

type

array

items

type

string

  • params

Parameters

Additional parameters to the WMS query (like dimension)

type

object

additionalProperties

The parameter value

type

string

  • headers

Headers

  • version

Version

The used WMS version

type

string

default

1.1.1

additionalProperties

False

Layer Mapnik

type

object

properties

  • type

const

mapnik

  • title

Layer title

  • grid

Layer grid

  • bbox

Layer bounding box

  • min_resolution_seed

layer min resolution seed

  • px_buffer

Layer pixel buffer

  • meta

Layer meta

  • meta_size

default

1

Layer meta size

  • meta_buffer

default

0

Layer meta buffer

  • layers

default

__all__

Layer layers

  • wmts_style

Layer WMTS style

  • mime_type

Layer MIME type

  • extension

Layer extension

  • dimensions

layer dimensions

  • legends

Layer legends

  • legend_mime

Layer legend MIME

  • legend_extension

Layer legend extension

  • pre_hash_post_process

Layer pre hash post process

  • post_process

Layer post process

  • geoms

Layer geometries

  • empty_tile_detection

Layer empty tile detection

  • empty_metatile_detection

Layer empty meta-tile detection

  • cost

Layer cost

  • mapfile

MapFile

The Mapnik map file

type

string

  • data_buffer

Data buffer

The data buffer

type

integer

default

128

  • output_format

Output format

The Mapnik output format

type

string

enum

png, png256, jpeg, grid

default

png

  • wms_url

WMS URL

A WMS fallback URL (deprecated)

type

string

  • resolution

Resolution

The resolution

type

integer

default

4

  • layers_fields

Layers fields

The Mapnik layers fields

type

object

additionalProperties

The Mapnik layer fields

type

array

items

type

string

  • drop_empty_utfgrid

Drop empty UTFGrid

Drop if the tile is empty

type

boolean

default

False

additionalProperties

False

Layer

The layer definition, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#configure-layers

anyOf

Layer WMS

Layer Mapnik

Process command

A command

type

array

items

type

object

properties

  • cmd

Command

The shell command, available parameters: %(in)s, %(out)s,` %(args)s`, %(x)s, %(y)s, %(z)s.

type

string

  • need_out

Need out

The command will generate an output in a file

type

boolean

default

False

  • arg

Argument

Used to build the %(args)

type

object

properties

  • default

Properties

The arguments used by default

type

string

  • verbose

Verbose

The arguments used on verbose mode

type

string

  • debug

Debug

The arguments used on debug mode

type

string

  • quiet

Quiet

The arguments used on quiet mode

type

string

additionalProperties

False

additionalProperties

False

Generation

The configuration used for the generation

type

object

properties

  • default_cache

Default cache

The default cache name to be used, default do ‘default’

type

string

default

default

  • default_layers

Default layers

The default layers to be generated

type

array

items

type

string

  • authorised_user

Authorized user

The authorized user to generate the tiles (used to avoid permission issue on generated tiles) (main configuration)

type

string

  • maxconsecutive_errors

Max consecutive errors

The maximum number of consecutive errors (main configuration)

type

integer

default

10

  • error_file

Error file

File name generated with the tiles in error, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#tiles-error-file (main configuration)

type

string

  • number_process

Number process

Number of process used to generate the tiles (main configuration)

type

integer

default

1

additionalProperties

False

AWS region

The region

type

string

pattern

^(eu|us|ap|sa)-(north|south|east|west|central)(east|west)?-[1-3]$

default

eu-west-1

PostgreSQL

The PostgreSQL configuration (main configuration), the schema can be configured with the TILECLOUD_CHAIN_POSTGRESQL_SCHEMA environment variable

type

object

properties

  • sqlalchemy_url

SQLAlchemy URL

The SQLAlchemy URL (like: postgresql+psycopg2://username:password@host:5432/database) (main configuration), can also be set in the TILECLOUD_CHAIN_SQLALCHEMY_URL environment variable

type

string

pattern

  • max_pending_minutes

Max pending minutes

The max pending minutes (main configuration)

type

integer

default

10

additionalProperties

False

Redis

The Redis configuration (main configuration)

type

object

properties

  • url

URL

The server URL (main configuration), can also be set in the TILECLOUD_CHAIN_REDIS_URL environment variable

type

string

pattern

^rediss?://([^:@/]*:[^:@/]*@)?[^:@/]+(:[0-9]+)?(/.*)?$

  • sentinels

Sentinels

The sentinels (main configuration), can also be set in the TILECLOUD_CHAIN_REDIS_SENTINELS environment variable

type

array

items

A sentinel (main configuration)

type

array

items

Sentinel host

The sentinel host name (main configuration)

type

string

Sentinel port

The sentinel port (main configuration)

anyOf

type

string

type

integer

additionalItems

False

  • connection_kwargs

The Redis connection arguments (main configuration)

type

object

  • sentinel_kwargs

The Redis sentinel arguments (main configuration)

type

object

  • service_name

Service name

The service name (main configuration), can also be set in the TILECLOUD_CHAIN_REDIS_SERVICE_NAME environment variable

type

string

default

mymaster

  • socket_timeout

Socket timeout

The socket timeout (main configuration), can also be set in the TILECLOUD_CHAIN_REDIS_SOCKET_TIMEOUT environment variable

type

integer

  • db

Database

The database number (main configuration), can also be set in the TILECLOUD_CHAIN_REDIS_DB environment variable

type

integer

  • queue

Queue

The queue name (main configuration), can also be set in the TILECLOUD_CHAIN_REDIS_QUEUE environment variable

type

string

default

tilecloud

  • timeout

Timeout

The timeout (main configuration), can also be set in the TILECLOUD_CHAIN_REDIS_TIMEOUT environment variable

type

integer

default

5

  • pending_timeout

Pending timeout

The pending timeout (main configuration)

type

integer

default

300

  • max_retries

Max retries

The max retries (main configuration)

type

integer

default

5

  • max_errors_age

Max errors age

The max error age (main configuration), default is 1 day

type

integer

default

86400

  • max_errors_nb

Max errors number

The max error number (main configuration)

type

integer

default

100

  • prefix

Prefix

The prefix (main configuration)

type

string

default

tilecloud_cache

  • expiration

Expiration

The meta-tile in queue expiration (main configuration), default is 8 hours

type

integer

default

28800

  • pending_count

Pending count

The pending count: the number of pending tiles get in one request (main configuration)

type

integer

default

10

  • pending_max_count

Pending max count

The pending max count: the maximum number of pending tiles get in one pass (if not generating other tiles, every second) (main configuration)

type

integer

default

10000

additionalProperties

False

Server

Configuration used by the tile server, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#distribute-the-tiles

type

object

properties

  • cache

Cache

The used cache name

type

string

  • layers

WMS Layers

Layers available in the server, default is all layers

type

array

items

type

string

  • geoms_redirect

Geometries redirect

Take care on the geometries

type

boolean

default

False

  • static_allow_extension

Static allow extension

The allowed extension of static files

type

array

default

jpeg

png

xml

js

html

css

items

type

string

  • wmts_path

WMTS path

The sub-path for the WMTS (main configuration)

type

string

default

wmts

  • static_path

Static path

The sub-path for the static files (main configuration)

type

string

default

static

  • admin_path

Admin path

The sub-path for the admin (main configuration)

type

string

default

admin

  • expires

Expires

The browser cache expiration in hours

type

integer

default

8

  • predefined_commands

Predefined commands

The predefined commands used to generate the tiles

type

array

items

type

object

properties

  • command

Command

The command to run

type

string

  • name

Name

The name used in the admin interface

type

string

additionalProperties

False

  • allowed_commands

Allowed commands

The allowed commands (main configuration)

type

array

default

generate-tiles

generate-controller

generate-cost

items

type

string

  • allowed_arguments

Allowed arguments

The allowed arguments (main configuration)

type

array

default

–layer

–get-hash

–generate-legend-images

–get-bbox

–help

–ignore-errors

–bbox

–zoom

–test

–near

–time

–measure-generation-time

–no-geom

–dimensions

items

type

string

  • admin_footer

admin footer

The footer of the admin interface

type

string

  • admin_footer_classes

admin footer classes

The CSS classes used on the footer of the admin interface

type

string

additionalProperties

False

Cost

The configuration use to calculate the cast (unmaintained)

type

object

properties

  • request_per_layers

Request per layers

Tile request per hours

type

integer

default

10000000

  • s3

S3 cost

The S3 cost (main configuration)

type

object

properties

  • storage

S3 Storage

The storage cost in $ / Gio / month (main configuration)

type

number

default

0.125

  • put

S3 Put

The cost of put in $ per 10 000 requests (main configuration)

type

number

default

0.01

  • get

S3 Get

The cost of get in $ per 10 000 requests (main configuration)

type

number

default

0.01

  • download

S3 Download

The cost of download in $ per Gio (main configuration)

type

number

default

0.12

additionalProperties

False

  • cloudfront

CloudFront cost

The CloudFront cost (main configuration)

type

object

properties

  • get

CloudFront Get

The cost of get in $ per 10 000 requests (main configuration)

type

number

default

0.009

  • download

CloudFront Download

The cost of download in $ per Gio (main configuration)

type

number

default

0.12

additionalProperties

False

  • sqs

SQS cost

The SQS cost, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#configure-sqs (main configuration)

type

object

properties

  • request

Request

The cost of request in $ per 1 000 000 requests (main configuration)

type

number

default

0.01

additionalProperties

False

additionalProperties

False

Metadata

The configuration of the WMTS capabilities metadata

type

object

properties

  • title

Title

The title

type

string

  • abstract

Abstract

The abstract

type

string

  • servicetype

Service type

The service type

type

string

default

OGC WMTS

  • keywords

Keywords

The keywords

type

array

items

type

string

  • fees

Fees

The fees

type

string

  • access_constraints

Access constraints

The access constraints

type

string

additionalProperties

False

Provider

The provider

type

object

properties

  • name

Name

type

string

  • url

URL

The public URL

type

string

  • contact

Contact

The contact

type

object

properties

  • name

Name

type

string

  • position

Position

type

string

  • info

Info

The information

type

object

properties

  • phone

Phone

The phone

type

object

properties

  • voice

Voice

The voice number

type

string

  • fax

Fax

The fax number

type

string

additionalProperties

False

  • address

Address

The address

type

object

properties

  • delivery

Delivery

The delivery

type

string

  • city

City

The city

type

string

  • area

Area

The area

type

string

  • postal_code

Postal code

The postal code

type

integer

  • country

Country

The country

type

string

  • email

Email

The email

type

string

additionalProperties

False

additionalProperties

False

additionalProperties

False

additionalProperties

False

Logging

The logging configuration to database, see https://github.com/camptocamp/tilecloud-chain/blob/master/tilecloud_chain/USAGE.rst#logging (main configuration)

type

object

properties

  • database

Database

The database (main configuration)

type

object

properties

  • host

Host

The host (main configuration)

type

string

  • port

Port

The port (main configuration)

type

integer

default

5432

  • dbname

Database

The database name (main configuration)

type

string

  • table

Table

The table name (main configuration)

type

string

  • user

User

The user name (main configuration)

type

string

  • password

Password

The password (main configuration)

type

string

additionalProperties

False

additionalProperties

False