Features - GeoJSON-LD

speccustomimplcandidate

Encode features as GeoJSON-LD.

Scope

Das Modul Features - GeoJSON-LD ergänzt die GeoJSON-Ausgabe um die folgenden Angaben:

  • A JSON-LD context to be referenced from the GeoJSON outputs of the Features and Feature resources. The context can be external or provided via the API. For this, in the ldproxy data directory, the context must be located under the relative path json-ld-contexts/{apiId}/{collectionId}.jsonld. Instead of {collectionId}.jsonld another file name can be configured via contextFileName. The context must contain at least the following entries:
  • "@version": 1.1
  • "geojson": "https://purl.org/geojson/vocab#"
  • "FeatureCollection": "geojson:FeatureCollection"
  • "features": { "@id": "geojson:features", "@container":"@set" }
  • "feature": "geojson:Feature"
  • "type": "geojson:type"
  • "properties":"@nest"
  • In addition to the "type" property, which is fixed to "Feature" in GeoJSON, "@type" is added as another property with the values specified in the configuration.
  • In addition to the "id" property, "@id" is added as another property based on the value from "id" and the URI template specified in the configuration. Dabei wird {{serviceUrl}} durch die Landing-Page-URI der API, {{collectionId}} durch die Collection-ID und {{featureId}} durch den Wert von "id" ersetzt.

Path Parameters

NameResourcesDescription
collectionId
JSON-LD Context
The identifier of the feature collection.

Configuration

Options

NameDefaultDescriptionTypeSince
buildingBlock
Always GEO_JSON_LD.
string
v2.0
extensionType
Deprecated See buildingBlock.
string
v2.0
enabled
false
Enable the building block?
boolean
v2.0
contextFileName
null
File name of the JSON-LD context document in the folder api-resources/json-ld-contexts/{apiId}.
string
v2.0
context
null
URI of the JSON-LD context document. The value should either be an external URI or {{serviceUrl}}/collections/{{collectionId}}/context for contexts provided by the API (see below for details). The template may contain {{serviceUrl}} (substituted with the API landing page URI) and {{collectionId}} (substituted with the collection id).
string
v2.0
types
[ "geojson:Feature" ]
Value of @type that is added to every feature.
array
v2.0
idTemplate
Value of @id that is added to every feature. The template may contain {{serviceUrl}} (substituted with the API landing page URI), {{collectionId}} (substituted with the collection id) and {{featureId}} (substituted with the feature id).
string
v2.0

Examples


- buildingBlock: GEO_JSON_LD
  enabled: true
  context: '{{serviceUrl}}/collections/{{collectionId}}/context'
  types:
  - geojson:Feature
  - sosa:Observation
  idTemplate: '{{serviceUrl}}/collections/{{collectionId}}/items/{{featureId}}'