Features - GeoJSON
specstableimplmatureEncode features as GeoJSON.
Scope
Conformance Classes
Features GeoJSON implements all requirements of conformance class GeoJSON from OGC API - Features - Part 1: Core 1.0 for the two mentioned resources.
Configuration
Options
| Name | Default | Description | Type | Since |
|---|---|---|---|---|
buildingBlock | Always GEO_JSON. | string | v2.0 | |
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 | v2.0 |
useAlias | false | If true, properties of the feature schema that declare an alias are encoded under their alias instead of their schema name. Useful for application schemas where each property carries both a short technical name and a longer mnemonic name (e.g. AdV NAS: arf / artDerFlurstuecksgrenze). An explicit rename transformation on a property still takes precedence over the alias. The flag only affects feature encoding output; queryables, sortables and other schema-derivation paths always use the schema names. | boolean | v2.0 |
enabled | true | Enable the building block? | boolean | v2.0 |
defaultProfiles | {"rel": "rel-as-link", "geojson": "rfc7946"} | Change the default value of the profile parameter for this feature format. The value is an object where the key is the id of a profile set, such as rel, and the value is the default profile for the profile set, e.g., rel-as-key. These defaults override the defaults specified in the Features building block. | object | v4.2 |
This building block does not require or support any additional configuration files.
Examples
An example of flattening. The non-flattened feature
{
"type" : "Feature",
"id" : "1",
"geometry" : {
"type" : "Point",
"coordinates" : [ 7.0, 50.0 ]
},
"properties" : {
"name" : "Beispiel",
"inspireId" : "https://example.org/id/soziales/kindergarten/1",
"serviceType" : {
"title" : "Kinderbetreuung",
"href" : "https://inspire.ec.europa.eu/codelist/ServiceTypeValue/childCareService"
},
"pointOfContact" : {
"address" : {
"thoroughfare" : "Beispielstr.",
"locatorDesignator" : "123",
"postCode" : "99999",
"adminUnit" : "Irgendwo"
},
"telephoneVoice" : "0211 16021740"
},
"occupancy" : [ {
"typeOfOccupant" : "vorschule",
"numberOfOccupants" : 20
}, {
"typeOfOccupant" : "schulkinder",
"numberOfOccupants" : 25
} ]
}
}
looks like this flattened with the default separator:
{
"type" : "Feature",
"id" : "1",
"geometry" : {
"type" : "Point",
"coordinates" : [ 7.0, 50.0 ]
},
"properties" : {
"name" : "Beispiel",
"inspireId" : "https://example.org/id/soziales/kindergarten/1",
"serviceType.title" : "Kinderbetreuung",
"serviceType.href" : "https://inspire.ec.europa.eu/codelist/ServiceTypeValue/childCareService",
"pointOfContact.address.thoroughfare" : "Otto-Pankok-Str.",
"pointOfContact.address.locatorDesignator" : "29",
"pointOfContact.address.postCode" : "40231",
"pointOfContact.address.adminUnit" : "Düsseldorf",
"pointOfContact.telephoneVoice" : "0211 16021740",
"occupancy.1.typeOfOccupant" : "vorschule",
"occupancy.1.numberOfOccupants" : 20,
"occupancy.2.typeOfOccupant" : "schulkinder",
"occupancy.2.numberOfOccupants" : 25
}
}
The relevant options in the configuration file:
- buildingBlock: GEO_JSON
transformations:
'*':
flatten: '.'