Features

specstableimplmature

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.0open in new window for the two operations resources.

Operations

ResourcePathMethodsMedia TypesDescription
Features
collections/{collectionId}/items
GET
CSV, CityJSON, CityJSON-Seq, FlatGeobuf, GML, GeoJSON, HTML, JSON-FG
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, CityJSON, CityJSON-Seq, FlatGeobuf, GML, GeoJSON, HTML, JSON-FG
The response is a document representing the feature with the requested feature identifier.

Path Parameters

NameResourcesDescription
collectionId
Features, Feature
The identifier of the feature collection.
featureId
Feature
The local identifier of the feature in the feature collection collectionId.

Query Parameters

NameResourcesDescription
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.

Configuration

Options

NameDefaultDescriptionTypeSince
buildingBlock
Always FEATURES_CORE.
string
v3.1
extensionType
Deprecated See buildingBlock.
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
showsFeatureSelfLink
false
Always add self link to features, even in the Features resource.
boolean
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
queryables
{}
Deprecated Use Module Feature Collections - Queryables. Controls which of the attributes in queries can be used for filtering data. A distinction is made between spatial (spatial), temporal (temporal) and "regular" (q, other) attributes. The attributes under spatial must be of type GEOMETRY in the provider schema, the attributes under temporal of type DATETIME or DATE. The searchable attributes are each listed by their name in an array. The queryables can be used in filter expressions (building block "filter"). The primary spatial and temporal attributes (see provider configuration) can be used for selection via the parameters bboxopen in new window and parameters datetimeopen in new window, respectively. The remaining attributes are defined as additional parameters for the respective feature collectionsopen in new window ("*" can be used as wildcard). In this way a selection of objects is already possible without additional building blocks. The attributes under q are also taken into account in the free text search in the query parameter with the same name.
object
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