Skip to content

Commit

Permalink
deploy: 81f4d4c
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed May 25, 2024
1 parent 9af0b4b commit aea7772
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 56 deletions.
55 changes: 30 additions & 25 deletions config-file.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,15 @@ <h1 class="menu-title">Martin Tile Server Documentation</h1>
<div id="content" class="content">
<main>
<h1 id="configuration-file"><a class="header" href="#configuration-file">Configuration File</a></h1>
<p>If you don’t want to expose all of your tables and functions, you can list your sources in a configuration file. To start Martin with a configuration file you need to pass a path to a file with a <code>--config</code> argument. Config files may contain environment variables, which will be expanded before parsing. For example, to use <code>MY_DATABASE_URL</code> in your config file: <code>connection_string: ${MY_DATABASE_URL}</code>, or with a default <code>connection_string: ${MY_DATABASE_URL:-postgresql://postgres@localhost/db}</code></p>
<p>If you don’t want to expose all of your tables and functions, you can list your sources in a configuration file. To
start Martin with a configuration file you need to pass a path to a file with a <code>--config</code> argument. Config files may
contain environment variables, which will be expanded before parsing. For example, to use <code>MY_DATABASE_URL</code> in your
config file: <code>connection_string: ${MY_DATABASE_URL}</code>, or with a
default <code>connection_string: ${MY_DATABASE_URL:-postgresql://postgres@localhost/db}</code></p>
<pre><code class="language-shell">martin --config config.yaml
</code></pre>
<p>You may wish to auto-generate a config file with <code>--save-config</code> argument. This will generate a config yaml file with all of your configuration, which you can edit to remove any sources you don’t want to expose.</p>
<p>You may wish to auto-generate a config file with <code>--save-config</code> argument. This will generate a config yaml file with
all of your configuration, which you can edit to remove any sources you don’t want to expose.</p>
<pre><code class="language-shell">martin ... ... ... --save-config config.yaml
</code></pre>
<h2 id="config-example"><a class="header" href="#config-example">Config Example</a></h2>
Expand All @@ -203,7 +208,7 @@ <h2 id="config-example"><a class="header" href="#config-example">Config Example<
# Amount of memory (in MB) to use for caching tiles [default: 512, 0 to disable]
cache_size_mb: 1024

# If the client accepts multiple compression formats, and the tile source is not pre-compressed, which compression should be used. `gzip` is faster, but `brotli` is smaller, and may be faster with caching. Defaults to brotli.
# If the client accepts multiple compression formats, and the tile source is not pre-compressed, which compression should be used. `gzip` is faster, but `brotli` is smaller, and may be faster with caching. Default could be different depending on Martin version.
preferred_encoding: gzip

# Database configuration. This can also be a list of PG configs.
Expand Down Expand Up @@ -264,76 +269,76 @@ <h2 id="config-example"><a class="header" href="#config-example">Config Example<
functions:
# Optionally set how source ID should be generated based on the function's name and schema
source_id_format: '{schema}.{function}'

# Associative arrays of table sources
tables:
table_source_id:
# ID of the MVT layer (optional, defaults to table name)
layer_id: 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 &gt;= 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]
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

# Associative arrays of function sources
functions:
function_source_id:
# 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 &gt;= 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]
bounds: [ -180.0, -90.0, 180.0, 90.0 ]

# Publish PMTiles files from local disk or proxy to a web server
pmtiles:
Expand All @@ -349,7 +354,7 @@ <h2 id="config-example"><a class="header" href="#config-example">Config Example<
pm-src1: /path/to/pmt.pmtiles
# A named source to a web server with a PMTiles file that supports range requests
pm-web2: https://example.org/path/tiles.pmtiles

# Publish MBTiles files
mbtiles:
paths:
Expand Down
60 changes: 33 additions & 27 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ <h3 id="docker"><a class="header" href="#docker">Docker</a></h3>
</code></pre>
<p>Martin provides <a href="https://github.com/mapbox/tilejson-spec">TileJSON</a> endpoint for each <a href="https://postgis.net/docs/using_postgis_dbmanagement.html#geometry_columns">geospatial-enabled</a> table in your database.</p>
<div style="break-before: page; page-break-before: always;"></div><h2 id="command-line-interface"><a class="header" href="#command-line-interface">Command-line Interface</a></h2>
<p>You can configure Martin using command-line interface. See <code>martin --help</code> or <code>cargo run -- --help</code> for more information.</p>
<p>You can configure Martin using command-line interface. See <code>martin --help</code> or <code>cargo run -- --help</code> for more
information.</p>
<pre><code class="language-shell">Usage: martin [OPTIONS] [CONNECTION]...

Arguments:
Expand Down Expand Up @@ -255,7 +256,7 @@ <h3 id="docker"><a class="header" href="#docker">Docker</a></h3>
Number of web server workers

--preferred-encoding &lt;PREFERRED_ENCODING&gt;
Martin server preferred tile encoding. If the client accepts multiple compression formats, and the tile source is not pre-compressed, which compression should be used. `gzip` is faster, but `brotli` is smaller, and may be faster with caching. Defaults to brotli
Martin server preferred tile encoding. If the client accepts multiple compression formats, and the tile source is not pre-compressed, which compression should be used. `gzip` is faster, but `brotli` is smaller, and may be faster with caching. Default could be different depending on Martin version

[possible values: brotli, gzip]

Expand Down Expand Up @@ -579,10 +580,15 @@ <h3 id="todo"><a class="header" href="#todo">TODO</a></h3>
martin postgresql://postgres@localhost/db
</code></pre>
<div style="break-before: page; page-break-before: always;"></div><h1 id="configuration-file"><a class="header" href="#configuration-file">Configuration File</a></h1>
<p>If you don’t want to expose all of your tables and functions, you can list your sources in a configuration file. To start Martin with a configuration file you need to pass a path to a file with a <code>--config</code> argument. Config files may contain environment variables, which will be expanded before parsing. For example, to use <code>MY_DATABASE_URL</code> in your config file: <code>connection_string: ${MY_DATABASE_URL}</code>, or with a default <code>connection_string: ${MY_DATABASE_URL:-postgresql://postgres@localhost/db}</code></p>
<p>If you don’t want to expose all of your tables and functions, you can list your sources in a configuration file. To
start Martin with a configuration file you need to pass a path to a file with a <code>--config</code> argument. Config files may
contain environment variables, which will be expanded before parsing. For example, to use <code>MY_DATABASE_URL</code> in your
config file: <code>connection_string: ${MY_DATABASE_URL}</code>, or with a
default <code>connection_string: ${MY_DATABASE_URL:-postgresql://postgres@localhost/db}</code></p>
<pre><code class="language-shell">martin --config config.yaml
</code></pre>
<p>You may wish to auto-generate a config file with <code>--save-config</code> argument. This will generate a config yaml file with all of your configuration, which you can edit to remove any sources you don’t want to expose.</p>
<p>You may wish to auto-generate a config file with <code>--save-config</code> argument. This will generate a config yaml file with
all of your configuration, which you can edit to remove any sources you don’t want to expose.</p>
<pre><code class="language-shell">martin ... ... ... --save-config config.yaml
</code></pre>
<h2 id="config-example"><a class="header" href="#config-example">Config Example</a></h2>
Expand All @@ -602,7 +608,7 @@ <h2 id="config-example"><a class="header" href="#config-example">Config Example<
# Amount of memory (in MB) to use for caching tiles [default: 512, 0 to disable]
cache_size_mb: 1024

# If the client accepts multiple compression formats, and the tile source is not pre-compressed, which compression should be used. `gzip` is faster, but `brotli` is smaller, and may be faster with caching. Defaults to brotli.
# If the client accepts multiple compression formats, and the tile source is not pre-compressed, which compression should be used. `gzip` is faster, but `brotli` is smaller, and may be faster with caching. Default could be different depending on Martin version.
preferred_encoding: gzip

# Database configuration. This can also be a list of PG configs.
Expand Down Expand Up @@ -663,76 +669,76 @@ <h2 id="config-example"><a class="header" href="#config-example">Config Example<
functions:
# Optionally set how source ID should be generated based on the function's name and schema
source_id_format: '{schema}.{function}'

# Associative arrays of table sources
tables:
table_source_id:
# ID of the MVT layer (optional, defaults to table name)
layer_id: 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 &gt;= 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]
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

# Associative arrays of function sources
functions:
function_source_id:
# 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 &gt;= 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]
bounds: [ -180.0, -90.0, 180.0, 90.0 ]

# Publish PMTiles files from local disk or proxy to a web server
pmtiles:
Expand All @@ -748,7 +754,7 @@ <h2 id="config-example"><a class="header" href="#config-example">Config Example<
pm-src1: /path/to/pmt.pmtiles
# A named source to a web server with a PMTiles file that supports range requests
pm-web2: https://example.org/path/tiles.pmtiles

# Publish MBTiles files
mbtiles:
paths:
Expand Down
5 changes: 3 additions & 2 deletions run-with-cli.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ <h1 class="menu-title">Martin Tile Server Documentation</h1>
<div id="content" class="content">
<main>
<h2 id="command-line-interface"><a class="header" href="#command-line-interface">Command-line Interface</a></h2>
<p>You can configure Martin using command-line interface. See <code>martin --help</code> or <code>cargo run -- --help</code> for more information.</p>
<p>You can configure Martin using command-line interface. See <code>martin --help</code> or <code>cargo run -- --help</code> for more
information.</p>
<pre><code class="language-shell">Usage: martin [OPTIONS] [CONNECTION]...

Arguments:
Expand Down Expand Up @@ -212,7 +213,7 @@ <h2 id="command-line-interface"><a class="header" href="#command-line-interface"
Number of web server workers

--preferred-encoding &lt;PREFERRED_ENCODING&gt;
Martin server preferred tile encoding. If the client accepts multiple compression formats, and the tile source is not pre-compressed, which compression should be used. `gzip` is faster, but `brotli` is smaller, and may be faster with caching. Defaults to brotli
Martin server preferred tile encoding. If the client accepts multiple compression formats, and the tile source is not pre-compressed, which compression should be used. `gzip` is faster, but `brotli` is smaller, and may be faster with caching. Default could be different depending on Martin version

[possible values: brotli, gzip]

Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.json

Large diffs are not rendered by default.

0 comments on commit aea7772

Please sign in to comment.