mirror of
https://github.com/maplibre/martin.git
synced 2024-12-30 02:11:48 +03:00
3dc54d7f9e
Add a top level config parameter -- the size of cache memory (in MB) to use for caching tiles and PMT directories, defaulting to 512, and 0 to disable. This also removes the `pmtiles.dir_cache_size_mb` parameter (it will be ignored, but will give a warning) ``` cache_size_mb: 512 ``` The new cache will contain all tiles as provided by the source. So if PostgreSQL returns a non-compressed tile, the cache will contain the uncompressed variant, and will be compressed for each response. This will be fixed in the later releases. Note that fonts and sprites are not cached at this time, and are still a TODO.
186 lines
4.5 KiB
YAML
186 lines
4.5 KiB
YAML
---
|
|
# Connection keep alive timeout [default: 75]
|
|
keep_alive: 75
|
|
|
|
# The socket address to bind [default: 0.0.0.0:3000]
|
|
listen_addresses: '0.0.0.0:3000'
|
|
|
|
# Number of web server workers
|
|
worker_processes: 8
|
|
|
|
# Amount of memory (in MB) to use for caching tiles [default: 512, 0 to disable]
|
|
cache_size_mb: 8
|
|
|
|
# Database configuration. This can also be a list of PG configs.
|
|
postgres:
|
|
# Database connection string
|
|
connection_string: '${DATABASE_URL:postgresql://postgres@localhost:5432/db}'
|
|
|
|
# If a spatial table has SRID 0, then this SRID will be used as a fallback
|
|
default_srid: 4326
|
|
|
|
# Maximum Postgres connections pool size [default: 20]
|
|
pool_size: 20
|
|
|
|
auto_publish:
|
|
tables:
|
|
from_schemas: autodetect
|
|
id_columns: [feat_id, big_feat_id]
|
|
clip_geom: false
|
|
buffer: 3
|
|
extent: 9000
|
|
|
|
# Associative arrays of table sources
|
|
tables:
|
|
table_source:
|
|
# Table schema (required)
|
|
schema: public
|
|
|
|
# Table name (required)
|
|
table: table_source
|
|
|
|
# Geometry SRID (required)
|
|
srid: 4326
|
|
|
|
# Geometry column name (required)
|
|
geometry_column: geom
|
|
|
|
# Feature id column name
|
|
id_column: ~
|
|
|
|
# An integer specifying the minimum zoom level
|
|
minzoom: 0
|
|
|
|
# An integer specifying the maximum zoom level. MUST be >= minzoom
|
|
maxzoom: 30
|
|
|
|
# The maximum extent of available map tiles. Bounds MUST define an area
|
|
# covered by all zoom levels. The bounds are represented in WGS:84
|
|
# latitude and longitude values, in the order left, bottom, right, top.
|
|
# Values may be integers or floating point numbers.
|
|
bounds: [-180.0, -90.0, 180.0, 90.0]
|
|
|
|
# Tile extent in tile coordinate space
|
|
extent: 4096
|
|
|
|
# Buffer distance in tile coordinate space to optionally clip geometries
|
|
buffer: 64
|
|
|
|
# Boolean to control if geometries should be clipped or encoded as is
|
|
clip_geom: true
|
|
|
|
# Geometry type
|
|
geometry_type: GEOMETRY
|
|
|
|
# List of columns, that should be encoded as tile properties (required)
|
|
properties:
|
|
gid: int4
|
|
|
|
MixPoints:
|
|
schema: MIXEDCASE
|
|
table: MixPoints
|
|
id_column: giD
|
|
geometry_column: geoM
|
|
srid: 4326
|
|
geometry_type: POINT
|
|
properties:
|
|
taBLe: text
|
|
|
|
points1:
|
|
layer_id: abc
|
|
schema: public
|
|
table: points1
|
|
minzoom: 0
|
|
maxzoom: 30
|
|
bounds: [-180.0, -90.0, 180.0, 90.0]
|
|
id_column: ~
|
|
geometry_column: geom
|
|
srid: 4326
|
|
extent: 4096
|
|
buffer: 64
|
|
clip_geom: true
|
|
geometry_type: POINT
|
|
properties:
|
|
gid: int4
|
|
|
|
points2:
|
|
schema: public
|
|
table: points2
|
|
minzoom: 0
|
|
maxzoom: 30
|
|
bounds: [-180.0, -90.0, 180.0, 90.0]
|
|
id_column: ~
|
|
geometry_column: geom
|
|
srid: 4326
|
|
extent: 4096
|
|
buffer: 64
|
|
clip_geom: true
|
|
geometry_type: POINT
|
|
properties:
|
|
gid: int4
|
|
|
|
points3857:
|
|
schema: public
|
|
table: points3857
|
|
minzoom: 0
|
|
maxzoom: 30
|
|
bounds: [-180.0, -90.0, 180.0, 90.0]
|
|
id_column: ~
|
|
geometry_column: geom
|
|
srid: 3857
|
|
extent: 4096
|
|
buffer: 64
|
|
clip_geom: true
|
|
geometry_type: POINT
|
|
properties:
|
|
gid: int4
|
|
|
|
# Associative arrays of function sources
|
|
functions:
|
|
function_zxy_query:
|
|
# Schema name (required)
|
|
schema: public
|
|
|
|
# Function name (required)
|
|
function: function_zxy_query
|
|
|
|
# An integer specifying the minimum zoom level
|
|
minzoom: 0
|
|
|
|
# An integer specifying the maximum zoom level. MUST be >= minzoom
|
|
maxzoom: 30
|
|
|
|
# The maximum extent of available map tiles. Bounds MUST define an area
|
|
# covered by all zoom levels. The bounds are represented in WGS:84
|
|
# latitude and longitude values, in the order left, bottom, right, top.
|
|
# Values may be integers or floating point numbers.
|
|
bounds: [-180.0, -90.0, 180.0, 90.0]
|
|
|
|
function_zxy_query_test:
|
|
schema: public
|
|
function: function_zxy_query_test
|
|
minzoom: 0
|
|
maxzoom: 30
|
|
bounds: [-180.0, -90.0, 180.0, 90.0]
|
|
|
|
fnc_Mixed_Name:
|
|
schema: MixedCase
|
|
function: function_Mixed_Name
|
|
|
|
|
|
pmtiles:
|
|
paths:
|
|
- http://localhost:5412/webp2.pmtiles
|
|
sources:
|
|
pmt: tests/fixtures/pmtiles/stamen_toner__raster_CC-BY+ODbL_z3.pmtiles
|
|
pmt2: http://localhost:5412/webp2.pmtiles
|
|
|
|
sprites:
|
|
paths: tests/fixtures/sprites/src1
|
|
sources:
|
|
mysrc: tests/fixtures/sprites/src2
|
|
|
|
fonts:
|
|
- tests/fixtures/fonts/overpass-mono-regular.ttf
|
|
- tests/fixtures/fonts
|