OGC API Features¶
The OGC API is a new standard that defines a modular API following the REST standard to access spatial data.
The current implementation in c2cgeoportal is only on the server side. It is based on the
OGC API - Features <https://ogcapi.ogc.org/features/> standard and only works
with the items request using a bbox filter.
It is currently supported by both MapServer and QGIS Server.
In the MapServer configuration file, the following changes could be added to set an alias to a the MAPS block:
#
# Map aliases
#
MAPS
ExampleOGCserver "/etc/mapserver/mapserver.map"
END
Then use this alias as the ogc-server value in the URL for MapServer.
e.g.: config://mapserver/mapserv_proxy/ExampleOGCserver.
It is also recommended for any server type, to remove all special characters in the OGC Server names because they appear in the path of the URL.
The OGC Server should have the same name than the alias and use the following URL:
config://mapserver/mapserv_proxy/<alias>?MAP=<alias>, where <alias> is the name of the alias.
The alias is at two place in the URL to make working both the WMS and the OGC API.
For QGIS Server, the URL didn’t changes, it is config://qgisserver?MAP=<project_file>.
QGIS Server and MapServer are already configured to support the OGC API and detect automatically if the compatible path is requested.
OGC API features are accessible through mapserv_proxy, with the following URLs:
/mapserv_proxy/<ogc-server>/ogcapiand/mapserv_proxy/<ogc-server>/ogcapi/*: The MapServer and QGIS Server paths, the first one is the landing page.
QGIS Server uses /ogcapi as the OGC API root by default since QGIS 4, it can be configured with
QGIS_SERVER_API_WFS3_ROOT_PATH since QGIS 3.44.3. The former /mapserv_proxy/<ogc-server>/wfs3/*
paths are removed.
QGIS Server builds the OGC API URLs from the request, the proxy forwards the original Host header and
the HTTPS environment variable of the QGIS Server container should be set to on when the
application is served in HTTPS.