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/configuration.rst
+43-37Lines changed: 43 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,37 +48,43 @@ For more information related to API design rules (the ``api_rules`` property in
48
48
encoding: utf-8 # default server encoding
49
49
language: en-US # default server language
50
50
locale_dir: /path/to/translations
51
-
gzip: false # default server config to gzip/compress responses to requests with gzip in the Accept-Encoding header
51
+
ogc_schemas_location: /opt/schemas.opengis.net # optional local copy of https://schemas.opengis.net
52
+
gzip: false # default server config to gzip/compress responses to requests with gzip in the Accept-Encoding header
52
53
cors: true # boolean on whether server should support CORS
53
54
pretty_print: true # whether JSON responses should be pretty-printed
55
+
admin: false # whether to enable the Admin API
54
56
55
-
limits: # server limits on number of items to return. This property can also be defined at the resource level to override global server settings
57
+
# server limits on number of items to return.
58
+
# overridable when redefined in resource level configuration
59
+
limits:
56
60
default_items: 50
57
61
max_items: 1000
58
62
max_distance_x: 25
59
63
max_distance_y: 25
60
64
max_distance_units: m
61
65
on_exceed: throttle # throttle or error (default=throttle)
62
66
63
-
admin: false # whether to enable the Admin API
64
-
65
-
#optional configuration to specify a different set of templates for HTML pages. Recommend using absolute paths. Omit this to use the default provided templates
66
-
# This property can also be defined at the resource level to override global server settings for specific datasets
67
-
templates: # optional configuration to specify a different set of templates for HTML pages. Recommend using absolute paths. Omit this to use the default provided templates
67
+
# configuration to specify directory tree for HTML page templates
68
+
# omit this to use the default pygeoapi templates
69
+
#overridable when redefined in resource level configuration
70
+
templates:
71
+
# recommended to use absolute paths
68
72
path: /path/to/jinja2/templates/folder # path to templates folder containing the Jinja2 template HTML files
69
73
static: /path/to/static/folder # path to static folder containing css, js, images and other static files referenced by the template
These per-Provider configuration fields are all optional. Default for CRS-values is `http://www.opengis.net/def/crs/OGC/1.3/CRS84`, so "WGS84" with lon/lat axis ordering.
21
-
If the storage CRS of the spatial feature collection is a dynamic coordinate reference system,
22
-
`storage_crs_coordinate_epoch` configures the coordinate epoch of the coordinates.
68
+
.. note::
69
+
Configuration is done with URI formats like http://www.opengis.net/def/crs/OGC/1.3/CRS84.
70
+
Both `URI` and `URN` CRS notation format are supported.
71
+
The `EPSG:` format like EPSG:4326 is outside the scope of the OGC standard.
23
72
24
-
There is also support for CRSs that support height like `http://www.opengis.net/def/crs/OGC/1.3/CRS84h`. In that case
25
-
bbox parameters (see below) may contain 6 coordinates.
26
73
27
74
Metadata
28
75
--------
29
76
30
-
The conformance class `http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs` is present as a `conformsTo` field
31
-
in the root landing page response.
77
+
The conformance class http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs is
78
+
present as a `conformsTo` field in the root landing page response.
32
79
33
80
The configured CRSs, or their defaults, `crs` and `storageCrs` and optionally `storageCrsCoordinateEpoch` will be present in the "Describe Collection" response.
34
81
82
+
.. note::
83
+
If the storage CRS of the spatial feature collection is a dynamic coordinate reference system,
84
+
`storage_crs_coordinate_epoch` configures the coordinate epoch of the coordinates.
85
+
86
+
.. note::
87
+
There is also support for CRSs that support height like `http://www.opengis.net/def/crs/OGC/1.3/CRS84h`. In that case
88
+
bbox parameters (see below) may contain 6 coordinates.
89
+
35
90
Parameters
36
91
----------
37
92
38
93
The `items` query supports the following parameters:
39
94
40
-
* `crs` - the CRS in which Features coordinates should be returned, also for the 'get single item' request
41
-
* `bbox-crs` - the CRS of the `bbox` parameter (only for Providers that support the `bbox` parameter)
95
+
* ``crs`` - the CRS in which Features coordinates should be returned, also for the 'get single item' request
96
+
* ``bbox-crs`` - the CRS of the `bbox` parameter (for Providers that support the `bbox` parameter)
97
+
* ``filter-crs`` - the CRS of the CQL filter expression (for Providers that support `CQL` filters)
42
98
43
99
If any or both of these parameters are specified, their CRS-value should be from the advertised CRS-list in the Collection metadata (see above).
44
100
@@ -52,21 +108,29 @@ Note that the values of these parameters may need to be URL-encoded.
52
108
Implementation
53
109
--------------
54
110
55
-
CRS and BBOX CRS support is implemented for all Feature Providers. Some details may help understanding (performance) implications.
111
+
CRS and BBOX CRS support is implemented for all Feature Providers.
112
+
Some details may help understanding (performance) implications.
56
113
57
-
BBOX CRS Parameter
114
+
bbox-crs Parameter
58
115
^^^^^^^^^^^^^^^^^^
59
116
60
-
The `bbox-crs` parameter is handled at the common level of pygeoapi, thus transparent for Feature Providers.
61
-
Obviously the Provider should support `bbox`.
62
-
A transformation of the `bbox` parameter is performed
117
+
The ``bbox-crs`` parameter is handled at the common level of pygeoapi.
118
+
A transformation of the request `bbox` parameter is performed
63
119
according to the `storage_crs` configuration. Then the (transformed) `bbox` is passed with the
64
120
other query parameters to the Provider instance.
65
121
66
-
CRS Parameter
122
+
filter-crs Parameter
123
+
^^^^^^^^^^^^^^^^^^^^
124
+
125
+
The ``filter-crs`` parameter is handled at the common level of pygeoapi.
126
+
A transformation of the request `CQL` filter is performed
127
+
according to the `storage_crs` configuration. Then the (transformed) `filter` is passed with the
128
+
other query parameters to the Provider instance.
129
+
130
+
crs Parameter
67
131
^^^^^^^^^^^^^
68
132
69
-
When the value of the `crs` parameter differs from the Provider data Storage CRS, the response Feature coordinates
133
+
When the value of the ``crs`` parameter differs from the Provider data Storage CRS, the response Feature coordinates
70
134
need to be transformed to that CRS. As some Feature Providers like PostgreSQL or OGR may support native
71
135
coordinate transformation, pygeoapi delegates transformation to those Providers, passing the `crs` with the other query parameters.
72
136
@@ -245,4 +309,6 @@ Or you may specify both `crs` and `bbox-crs` and thus `bbox` in that CRS `http:/
245
309
.
246
310
.
247
311
248
-
.. _`OGC API - Features - Part 2: Coordinate Reference Systems by Reference corrigendum`: https://docs.opengeospatial.org/is/18-058r1/18-058r1.html
0 commit comments