You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/data-publishing/ogcapi-tiles.rst
+41Lines changed: 41 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ pygeoapi core tile providers are listed below, along with supported features.
22
22
`MVT-elastic`_,✅,✅,✅,❌,❌,✅
23
23
`MVT-proxy`_,❓,❓,❓,❓,❌,✅
24
24
`WMTSFacade`_,✅,❌,✅,✅,✅,❌
25
+
`MVT-postgres`_,✅,✅,✅,✅,❌,✅
25
26
26
27
Below are specific connection examples based on supported providers.
27
28
@@ -130,6 +131,46 @@ Following code block shows how to configure pygeoapi to read Mapbox vector tiles
130
131
name: pbf
131
132
mimetype: application/vnd.mapbox-vector-tile
132
133
134
+
MVT-postgres
135
+
^^^^^^^^^^^^
136
+
137
+
.. note::
138
+
Requires Python packages sqlalchemy, geoalchemy2 and psycopg2-binary
139
+
140
+
Must have PostGIS installed with protobuf-c support.
141
+
142
+
.. note::
143
+
Geometry must be using EPSG:4326
144
+
145
+
This provider gives support to serving tiles generated using `Postgres <https://www.postgresql.org/>`_ with `PostGIS <https://postgis.net/>`_.
146
+
The tiles are rendered on-the-fly using `ST_AsMVT <https://postgis.net/docs/ST_AsMVT.html>`_ and related methods.
147
+
148
+
This code block shows how to configure pygeoapi to render Mapbox vector tiles from a PostGIS table.
149
+
150
+
.. code-block:: yaml
151
+
152
+
providers:
153
+
- type: tile
154
+
name: MVT-postgres
155
+
data:
156
+
host: 127.0.0.1
157
+
port: 3010# Default 5432 if not provided
158
+
dbname: test
159
+
user: postgres
160
+
password: postgres
161
+
search_path: [osm, public]
162
+
id_field: osm_id
163
+
table: hotosm_bdi_waterways
164
+
geom_field: foo_geom
165
+
options:
166
+
zoom:
167
+
min: 0
168
+
max: 10
169
+
format:
170
+
name: pbf
171
+
mimetype: application/vnd.mapbox-vector-tile
172
+
173
+
PostgreSQL-related connection options can also be added to `options`. Please refer to the :ref:`PostgreSQL OGC Features Provider<PostgreSQL>` documentation for more information.
0 commit comments