Postgis Vector (MVT)
This provider pulls from a table/view in a PostgreSQL database with a Postgis Geometry column and outputs in MVT format. This requires Postgis 3.X with a corresponding version of PostgreSQL. This provider does not support raster or geography data.
The intent of this provider is to avoid needing to install and operate a separate server for light use-cases with standard table structures. The data is pulled from postgis using built-in functions and a fixed format. If you need a highly customized query to pull the data from PG then it’s recommended you use a dedicated server for this such as Mapserver (see the CGI provider) or Martin (see the Proxy provider).
This provider is one of a few that directly talks to a database which brings with it special security concerns. Please see Security documentation for a discussion on Tilegroxy’s trust model.
Name should be "postgismvt"
Configuration options:
Parameter | Description | Type | Required | Default |
---|---|---|---|---|
Datastore |
The ID of the datastore to use for retrieving data. The datastore must have a type of "postgresql". Also see the Datastores documentation. |
string |
Yes |
None |
Table |
The relation (table/view/materialized view) to pull data from (including schema if outside the default search path) |
string |
Yes |
None |
Extent |
The resolution of the vector tile. Decrease this to make tiles smaller but more "blocky" |
uint |
No |
4096 |
Buffer |
How much extra data off the edges of vector tiles to include. This helps avoid phantom grid-lines and enables consistency in icons/label placement between tiles. The buffer is relative to the size of a tile; 0 means no buffer and 1 means a buffer equal to size of a tile |
float64 |
No |
0.125 |
GID |
The name of the feature ID column. This value is case-sensitive; this normally means it should be left in all-lowercase. |
string |
No |
gid |
Geometry |
The name of the geometry column. This value is case-sensitive; this normally means it should be left in all-lowercase. |
string |
No |
geom |
Attributes |
Any other columns from the table to include as attributes in the vector tile. This value is case-sensitive; this normally means it should be left in all-lowercase. |
[]string |
No |
None |
Filter |
A SQL snippet to include inside the WHERE clause of the query used to retrieve data. This snippet can include the standard placeholders (see Proxy provider for a list of these). The placeholder values are included as parameters in Prepared Statement to prevent SQL Injection, however outside of that the Filter is inserted into the SQL as-is. |
string |
No |
None |
SourceSRID |
The SRID of the geometries in the table. Mixed-projection tables are not supported. |
uint |
No |
4326 |
Limit |
A sanity limit of the number of geometries to include in the vector tiles. Using this provider against very large tables can give poor performance when zoomed-out, this parameter is a protection against intensive queries hanging until the request timeout limit is hit. There is no guarantee to which geometries will be skipped when the limit is hit which can lead to a bad user experience, therefore this is only recommended to be used as a secondary protection. |
uint |
No |
Unlimited |