Featuresspecstableimplmature
The core capabilities to publish feature data (vector data).
Scope
Features specifies the most important capabilities for sharing feature data.
The scope is restricted to fetching features where geometries are represented in the coordinate reference system WGS 84 with axis order longitude/latitude. Features can be selected using basic filtering criteria.Additional capabilities that address more advanced needs are provided in additional building blocks.
The formats (encodings) that the API supports are enabled through additional building blocks, too. By default, GeoJSON and HTML are enabled.
Response paging is supported. That is, if more features are available that the page size, a link to the next page with the next features is returned.
For spatial filtering a rectangular area (bbox
) can be specified. Only features that have a primary geometry that intersects the bounding box are selected. The bounding box is provided as four numbers:
- Lower left corner, coordinate axis 1
- Lower left corner, coordinate axis 2
- Upper right corner, coordinate axis 1
- Upper right corner, coordinate axis 2
If the primary geometry is never NULL
, the constraint required: true
should be set for the property in the provider schema. This speeds up queries with the bbox
parameter, especially with larger data sets.
The coordinate reference system of the values is WGS 84 longitude/latitude unless a different coordinate reference system is specified in the parameter bbox-crs
(see building block CRS).
For WGS 84 longitude/latitude the values are in most cases the sequence of minimum longitude, minimum latitude, maximum longitude and maximum latitude. However, in cases where the box spans the antimeridian the first value (west-most box edge) is larger than the third value (east-most box edge).
For temporal filtering an instant or interval (datetime
) can be specified. The value is either a local date, a date-time value in UTC or an interval. date and date-time expressions adhere to RFC 3339. Intervals are two instants, separated by a slash (/
). To indicate a half-bounded interval end a double-dot (..
) can be used.
If the primary instant is never NULL
, the constraint required: true
should be set for the property in the provider schema. This speeds up queries with the datetime
parameter, especially with larger data sets.
Additional attributes can be filtered based on their values, if they are configured as queryables.
All filter predicates must be met to select a feature.
Conformance Classes
Features implements all requirements of conformance class Core of OGC API - Features - Part 1: Core 1.0 for the two operations resources.
Operations
Resource | Path | Methods | Media Types | Description |
---|---|---|---|---|
Features | collections/{collectionId}/items | GET | CSV, Debug Tokens, FlatGeobuf, GML, GeoJSON, HTML | The response is a document consisting of features in the collection. The features included in the response are determined by the server based on the query parameters of the request. |
Feature | collections/{collectionId}/items/{featureId} | GET | CSV, Debug Tokens, FlatGeobuf, GML, GeoJSON, HTML | The response is a document representing the feature with the requested feature identifier. |
Path Parameters
Name | Resources | Description |
---|---|---|
collectionId | Features, Feature | The identifier of the feature collection. |
featureId | Feature | The local identifier of the feature in the feature collection collectionId . |
Query Parameters
Name | Resources | Description |
---|---|---|
bbox | Features | Select only features that have a primary geometry that intersects the bounding box. |
datetime | Features | Select only features that have a primary instant or interval that intersects the provided instant or interval. |
limit | Features | The maximum number of features that are presented in the response document. If more features are available, a link to the next page is provided with the response. If no parameter value is provided, the default value that is configured for the API applies. |
offset | Features | The index of the first feature in the response in the overall result set. This parameter is used for response paging. |
f | Features, Feature | Select the output format of the response. If no value is provided, the standard HTTP rules apply, i.e., the "Accept" header will be used to determine the format. |
profile | Features, Feature | This query parameter supports requesting variations in the representation of data in the same format, depending on the intended use of the data. The supported profiles depend on the provider schema of the feature collection. If a format does not support the requested profile, the best match for the requested profile is used depending on the format. The negotiated profiles are returned in links with rel set to profile . If the feature schema includes at least one property of type FEATURE_REF or FEATURE_REF_ARRAY , three profiles can be used to select the encoding of object references in the response. Supported are "rel-as-link" (a link with URI and a title), "rel-as-key" (the featureId of the referenced feature) and "rel-as-uri" (the URI of the referenced feature). Formats that only support simple values will typically not support "rel-as-link" and use "rel-as-key" as the default. HTML, GeoJSON, JSON-FG and GML use "rel-as-link" as the default. GML only supports "rel-as-link". If the building block Codelists is enabled and the feature schema includes at least one property with a "codelist" constraint, two profiles can be used to select the representation of coded values in the response. Supported are "val-as-code" (the code) and "val-as-title" (the label associated with the code). HTML uses "val-as-title" as the default, all other feature encodings use "val-as-code" as the default. Note: Explicit codelist transformations in the provider or in the service configuration are always executed, the "profile" parameter with a value "val-as-code" does not disable these transformations. |
Configuration
Options
Name | Default | Description | Type | Since |
---|---|---|---|---|
buildingBlock | Always FEATURES_CORE . | string | v3.1 | |
transformations | {} | Property transformations do not affect data sources, they are applied on-the-fly as part of the encoding. Filter expressions do not take transformations into account, they have to be based on the source values. That means queryable properties (see queryables in Features) should not use transformations in most cases. The exception to the rule is the HTML encoding, where readability might be more important than filter support. | object | v3.1 |
caching | {} | Sets fixed values for HTTP Caching Headers for the resources. | object | v3.1 |
enabled | true | Enable the building block? | boolean | v3.1 |
featureProvider | apiId | Id of the feature provider to use. Normally the feature provider and API ids are the same. | string | v3.1 |
featureType | collectionId | Id of the feature type to use as defined in the given feature provider. Normally the feature type and collection ids are the same. | string | v3.1 |
array | v3.1 | |||
defaultCrs | CRS84 | Default coordinate reference system, either CRS84 for datasets with 2D geometries or CRS84h for datasets with 3D geometries. | string | v3.1 |
minimumPageSize | 1 | Minimum value for parameter limit . | number | v3.1 |
defaultPageSize | 10 | Default value for parameter limit . | number | v3.1 |
maximumPageSize | 10000 | Maximum value for parameter limit . | number | v3.1 |
embeddedFeatureLinkRels | [] | Controls which links should be specified for each feature in the Features resource, if these exist. The values are the link relation types to be included. By default, links such as self or alternate are omitted from features in a FeatureCollection, this option can be used to add them if needed. | array | v3.1 |
validateCoordinatesInQueries | Validate the coordinates of the bbox or filter parameters against the domain of validity of the coordinate reference system | boolean | v3.1 | |
itemType | string | v3.1 | ||
coordinatePrecision | {} | Controls whether coordinates are limited to a certain number of places depending on the coordinate reference system used. The unit of measurement and the corresponding number of decimal places must be specified. Example: { "metre" : 2, "degree" : 7 } . Valid units of measurement are "metre" and "degree". | object | v3.1 |
Examples
Example of specifications in the configuration file for the entire API (or in defaults):
- buildingBlock: FEATURES_CORE
coordinatePrecision:
metre: 2
degree: 7
Example of the specifications in the configuration file for a feature collection:
- buildingBlock: FEATURES_CORE
enabled: true
itemType: feature
queryables:
spatial:
- geometry
temporal:
- date
q:
- name
- region
- subregion
- cluster
- village
- searchfield1
- searchfield2
other:
- registerId
- area_ha
embeddedFeatureLinkRels:
- self