Skip to content

Commit 59a6bae

Browse files
committed
Update CRS docs
1 parent eefd913 commit 59a6bae

File tree

2 files changed

+44
-35
lines changed

2 files changed

+44
-35
lines changed

docs/source/crs.rst

Lines changed: 43 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -24,45 +24,33 @@ Background
2424
pygeoapi implements the complete specification:
2525
`OGC API - Features - Part 2: Coordinate Reference Systems by Reference corrigendum`_.
2626
Under the hood, pygeoapi uses the well-known `pyproj`_ Python wrapper to the `PROJ`_ library.
27-
All default data plugins support `bbox-crs` and `crs`.
2827
For information on implementing CRS on custom plugins, see `Implementation`_.
2928

3029
CRS support exists for the following OGC APIs:
3130

3231
.. csv-table::
33-
:header: OGC API, bbox-crs, crs
32+
:header: OGC API, bbox-crs, filter-crs, crs
3433
:align: left
3534

36-
:ref:`OGC API - Features<ogcapi-features>`,✅,✅
37-
:ref:`OGC API - Maps<ogcapi-maps>`,✅,❌
38-
:ref:`OGC API - Coverages<ogcapi-coverages>`,✅,❌
35+
:ref:`OGC API - Features<ogcapi-features>`,✅,✅,✅
36+
:ref:`OGC API - Maps<ogcapi-maps>`,✅,❌,❌
37+
:ref:`OGC API - Coverages<ogcapi-coverages>`,✅,❌,❌
3938

4039
Configuration
4140
-------------
4241

4342
The CRS of a collection is defined in the provider block of your resource.
44-
The configuration controls how the `bbox-crs` and `crs` query parameters behave.
45-
All bbox queries are converted to the configured `storage_crs`.
46-
An error will be returned for any interaction with CRS not included in the configured `crs`.
47-
These are in URI formats like http://www.opengis.net/def/crs/OGC/1.3/CRS84 or
48-
the "OpenGIS" format like http://www.opengis.net/def/crs/EPSG/0/4258.
49-
Both 'URI' and 'URN' CRS notation format are supported.
43+
The configuration controls how the `crs` related query parameters behave.
5044

51-
.. note::
52-
That the "EPSG:" format like EPSG:4326 is outside the scope of the OGC standard.
53-
54-
* `crs` - list of CRSs supported
55-
* `storage_crs` - CRS in which the data is stored (must be in `crs` list)
56-
* `storage_crs_coordinate_epoch` - epoch of `storage_crs` for a dynamic coordinate reference system
57-
* `always_xy` - CRS axis order should disobey `ISO19111`_
5845

59-
.. note::
60-
If the storage CRS of the spatial feature collection is a dynamic coordinate reference system,
61-
`storage_crs_coordinate_epoch` configures the coordinate epoch of the coordinates.
46+
* ``crs`` - list of CRSs supported
47+
* ``storage_crs`` - CRS in which the data is stored (must be in `crs` list)
48+
* ``storage_crs_coordinate_epoch`` - epoch of `storage_crs` for a dynamic coordinate reference system
49+
* ``always_xy`` - CRS should ignore authority on axis order, disobeying `ISO-19111`_ (default: false)
6250

6351
.. note::
64-
There is also support for CRSs that support height like `http://www.opengis.net/def/crs/OGC/1.3/CRS84h`. In that case
65-
bbox parameters (see below) may contain 6 coordinates.
52+
bbox-crs and filter-crs are used to convert the request geometry to the configured ``storage_crs``.
53+
An error will be returned for any interaction with CRS not included in the configured ``crs`` list.
6654

6755
The per-Provider configuration fields are all optional,
6856
with the following as default configuration:
@@ -74,22 +62,36 @@ with the following as default configuration:
7462
- http://www.opengis.net/def/crs/OGC/1.3/CRS84h
7563
storage_crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
7664
65+
.. note::
66+
Configuration is done with URI formats like http://www.opengis.net/def/crs/OGC/1.3/CRS84.
67+
Both `URI` and `URN` CRS notation format are supported.
68+
The `EPSG:` format like EPSG:4326 is outside the scope of the OGC standard.
69+
7770

7871
Metadata
7972
--------
8073

81-
The conformance class `http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs` is present as a `conformsTo` field
82-
in the root landing page response.
74+
The conformance class http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs is
75+
present as a `conformsTo` field in the root landing page response.
8376

8477
The configured CRSs, or their defaults, `crs` and `storageCrs` and optionally `storageCrsCoordinateEpoch` will be present in the "Describe Collection" response.
8578

79+
.. note::
80+
If the storage CRS of the spatial feature collection is a dynamic coordinate reference system,
81+
`storage_crs_coordinate_epoch` configures the coordinate epoch of the coordinates.
82+
83+
.. note::
84+
There is also support for CRSs that support height like `http://www.opengis.net/def/crs/OGC/1.3/CRS84h`. In that case
85+
bbox parameters (see below) may contain 6 coordinates.
86+
8687
Parameters
8788
----------
8889

8990
The `items` query supports the following parameters:
9091

91-
* `crs` - the CRS in which Features coordinates should be returned, also for the 'get single item' request
92-
* `bbox-crs` - the CRS of the `bbox` parameter (only for Providers that support the `bbox` parameter)
92+
* ``crs`` - the CRS in which Features coordinates should be returned, also for the 'get single item' request
93+
* ``bbox-crs`` - the CRS of the `bbox` parameter (for Providers that support the `bbox` parameter)
94+
* ``filter-crs`` - the CRS of the CQL filter expression (for Providers that support `CQL` filters)
9395

9496
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).
9597

@@ -106,19 +108,26 @@ Implementation
106108
CRS and BBOX CRS support is implemented for all Feature Providers.
107109
Some details may help understanding (performance) implications.
108110

109-
BBOX CRS Parameter
111+
bbox-crs Parameter
110112
^^^^^^^^^^^^^^^^^^
111113

112-
The `bbox-crs` parameter is handled at the common level of pygeoapi, thus transparent for Feature Providers.
113-
Obviously the Provider should support `bbox`.
114-
A transformation of the `bbox` parameter is performed
114+
The ``bbox-crs`` parameter is handled at the common level of pygeoapi.
115+
A transformation of the request `bbox` parameter is performed
115116
according to the `storage_crs` configuration. Then the (transformed) `bbox` is passed with the
116117
other query parameters to the Provider instance.
117118

118-
CRS Parameter
119+
filter-crs Parameter
120+
^^^^^^^^^^^^^^^^^^^^
121+
122+
The ``filter-crs`` parameter is handled at the common level of pygeoapi.
123+
A transformation of the request `CQL` filter is performed
124+
according to the `storage_crs` configuration. Then the (transformed) `filter` is passed with the
125+
other query parameters to the Provider instance.
126+
127+
crs Parameter
119128
^^^^^^^^^^^^^
120129

121-
When the value of the `crs` parameter differs from the Provider data Storage CRS, the response Feature coordinates
130+
When the value of the ``crs`` parameter differs from the Provider data Storage CRS, the response Feature coordinates
122131
need to be transformed to that CRS. As some Feature Providers like PostgreSQL or OGR may support native
123132
coordinate transformation, pygeoapi delegates transformation to those Providers, passing the `crs` with the other query parameters.
124133

@@ -297,7 +306,7 @@ Or you may specify both `crs` and `bbox-crs` and thus `bbox` in that CRS `http:/
297306
.
298307
.
299308
300-
.. _`ISO19111`: http://docs.opengeospatial.org/as/18-005r5/18-005r5.html
309+
.. _`ISO-19111`: http://docs.opengeospatial.org/as/18-005r5/18-005r5.html
301310
.. _`OGC API - Features - Part 2: Coordinate Reference Systems by Reference corrigendum`: https://docs.opengeospatial.org/is/18-058r1/18-058r1.html
302311
.. _`PROJ`: https://proj.org/
303312
.. _`pyproj`: https://pyproj4.github.io/pyproj/stable

docs/source/publishing/ogcapi-coverages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ The `Xarray`_ provider plugin reads and extracts `NetCDF`_ and `Zarr`_ data.
7777
time_field: time
7878
# optionally specify the coordinate reference system of your dataset
7979
# else pygeoapi assumes it is WGS84 (EPSG:4326).
80-
storage_crs: 4326
80+
storage_crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
8181
format:
8282
name: netcdf
8383
mimetype: application/x-netcdf

0 commit comments

Comments
 (0)