Features - CityJSON

specstableimplcandidate

Kodierung von CityGML Gebäuden (LoD1, LoD2) als CityJSON.

Umfang

Der Baustein Features CityJSON unterstützt CityJSON 1.0 und 1.1 als Kodierung für Features. Unterstützt werden die Objektarten Building und BuildingPart.

Limitierungen

Die Unterstützung ist auf LoD1 und LoD2 Gebäude mit Gebäudeteilen beschränkt. Alle anderen Objekttypen, einschließlich Appearance-Objekte, werden nicht unterstützt.

Konformitätsklassen

Features - CityJSON implementiert Unterstützung für CityJSON 1.0open in new window und CityJSON 1.1open in new window.

Konfiguration

Voraussetzungen

Der Baustein erfordert, dass der Feature-Provider einen Typ building enthält, der auf ein CityJSON-Building-Feature abgebildet wird. Eigenschaften des Typs building werden wie folgt auf CityJSON abgebildet:

  • consistsOfBuildingPart: Der Wert muss ein Objekt mit denselben Eigenschaften wie bei building sein.
    Das Objekt wird als ein BuildingPart-Feature zu dem Gebäude kodiert.
  • address: Der Wert muss ein Array von Adressobjekten sein. Die folgenden Attribute werden abgebildet
    auf ein Address-Objekt abgebildet, alle anderen Eigenschaften werden ignoriert:
  • multiPoint: eine MULTI_POINT-Geometrie, die den Standort der Adresse darstellt
  • ThoroughfareName: eine Zeichenkette
  • ThoroughfareNumber: eine Zeichenkette
  • LocalityName: eine Zeichenkette
  • PostalCode: eine Zeichenkette
  • AdministrativeArea: eine Zeichenkette
  • CountryName: eine Zeichenkette
  • lod1Solid: eine geschlossene MULTI_POLYGON-Geometrie, die die Hülle des Gebäudes bei LoD 1 darstellt.
  • lod2Solid: eine geschlossene MULTI_POLYGON-Geometrie, die die Hülle des Gebäudes bei LoD 2 darstellt.
  • surfaces: ein Array von semantischen Oberflächenobjekten. Das Objekt muss einen surfaceType haben und die
    Werte müssen einer der folgenden sein: CeilingSurface, ClosureSurface, Door, FloorSurface,
    GroundSurface, InteriorWallSurface, OuterCeilingSurface, OuterFloorSurface, RoofSurface,
    WallSurface, oder Window. Das Objekt sollte eine Eigenschaft mit einer POLYGON oder MULTI_POLYGON
    Geometrie, die die Flächengeometrie darstellt.
  • alle anderen Eigenschaften: Die Eigenschaft wird auf ein CityJSON-Attribut abgebildet, mit Ausnahme der Eigenschaft "gml_id".

Die Eigenschaft des building-Typs mit der Rolle ID wird als CityJSON-ID verwendet. Da die eingebetteten Gebäudeteile keine Eigenschaft mit der Rolle ID haben, wird - sofern vorhanden - der Wert einer Eigenschaft id als Id des CityJSON-Gebäudeteils verwendet; ansonsten wird eine UUID generiert. Die Werte der Eigenschaft id müssen eindeutig sein.

Das Beispiel enthält eine Typdefinition für Gebäudeobjekte in einem PostgreSQL-Feature-Provider auf Grundlage des CityGML-Profils der deutschen Vermessungsverwaltung.

Optionen

NameDefaultBeschreibungTypSeit
buildingBlock
Immer CITY_JSON.
string
v2.0
enabled
false
Soll der Baustein aktiviert werden?
boolean
v2.0
transformations
{}
Property-Transformationen erfolgen bei der Aufbereitung der Daten für die Rückgabe über die API. Die Datenhaltung selbst bleibt unverändert. Alle Filterausdrücke (siehe queryables in Features) wirken unabhängig von etwaigen Transformationen bei der Ausgabe und müssen auf der Basis der Werte in der Datenhaltung formuliert sein - die Transformationen sind i.A. nicht umkehrbar und eine Berücksichtigung der inversen Transformationen bei Filterausdrücken wäre kompliziert und nur unvollständig möglich. Insofern sollten Eigenschaften, die queryable sein sollen, möglichst bereits in der Datenquelle transformiert sein. Eine Ausnahme sind typischerweise Transformationen in der HTML-Ausgabe, wo direkte Lesbarkeit i.d.R. wichtiger ist als die Filtermöglichkeit.
object
v2.0
useAlias
false
Wenn true, werden Eigenschaften des Feature-Schemas, für die ein alias angegeben ist, unter dem Alias anstelle des Schemanamens kodiert. Hilfreich für Anwendungsschemata, in denen jede Eigenschaft sowohl einen kurzen technischen Namen als auch einen längeren eingängigen Namen hat (z.B. AdV-NAS: arf / artDerFlurstuecksgrenze). Eine explizite rename-Transformation für eine Eigenschaft hat weiterhin Vorrang vor dem Alias. Die Option wirkt nur auf die Feature-Kodierung; Queryables, Sortables und andere Schema-Ableitungen verwenden immer die Schemanamen.
boolean
v2.0
textSequences
false
Aktiviert die Unterstützung für CityJSON Text Sequences (Media-Type application/city+json-seq). Erfordert mindestens Version 1.1.
boolean
v3.3
version
V11
Wählen Sie die CityJSON-Version, die zurückgegeben werden soll. Unterstützte Versionen sind V10 (CityJSON 1.0) und V11 (CityJSON 1.1).
string
v3.3
defaultProfiles
{}
Spezifiziert den Standardwert des Profile-Parameters für Features. Der Wert ist ein Objekt, bei dem der Schlüssel die ID eines Profilsatzes ist, z. B. rel, und der Wert das Standardprofil für den Profilsatz, z. B. rel-as-key. Diese Vorgaben haben Vorrang vor den im Features-Baustein angegebenen Standardprofilen.
object
v4.2

Dieses Modul benötigt bzw. unterstützt keine zusätzlichen Konfigurationsdateien.

Beispiele

API:


- buildingBlock: CITY_JSON
 enabled: true
 textSequences: false
 version: V11

Feature Provider:


types:
 building:
   label: Gebäude
   sourcePath: /building{filter=fk_buildingpart_parent IS NULL}
   type: OBJECT
   objectType: Building
   properties:
     id:
       label: Objekt-ID
       sourcePath: id
       type: INTEGER
       role: ID
     gml_id:
       label: ALKIS-ID
       sourcePath: gml_id
       type: STRING
     name:
       label: Name
       description: 'Nur bei Gebäudeeigennamen gesetzt.'
       sourcePath: feature_name
       type: STRING
     bbox:
       label: Bounding Box
       sourcePath: envelope
       type: GEOMETRY
       geometryType: POLYGON
       role: PRIMARY_GEOMETRY
     lod12GroundSurface:
       label: Grundfläche
       sourcePath: lod12groundsurface
       type: GEOMETRY
       geometryType: MULTI_POLYGON
     measuredHeight:
       label: Gebäudehöhe [m]
       description: 'Höhe des Gebäudes aus der Differenz in Metern zwischen dem höchsten Bezugspunkt und dem tiefsten Bezugspunkt des Gebäudes.'
       sourcePath: measuredheight
       type: FLOAT
     storeysAboveGround:
       label: Geschosse
       sourcePath: storeysaboveground
       type: INTEGER
     roofType:
       label: Dachform
       description: 'Die Bedeutung der einzelnen Werte ergibt aus der Codelist <a href="https://repository.gdi-de.org/schemas/adv/citygml/Codelisten/RoofTypeTypeAdV.xml"  target="_blank" >RoofTypeTypeAdV.xml</a>.'
       sourcePath: rooftype
       type: STRING
       constraints:
         codelist: RoofType
     creationDate:
       label: Erzeugungsdatum
       sourcePath: creation
       type: DATE
       role: PRIMARY_INSTANT
     function:
       label: Gebäudefunktion
       description: 'Die Bedeutung der einzelnen Werte ergibt aus der Codelist <a href="https://repository.gdi-de.org/schemas/adv/citygml/Codelisten/BuildingFunctionTypeAdV.xml"  target="_blank" >BuildingFunctionTypeAdV.xml</a>.'
       sourcePath: function
       type: STRING
       constraints:
         codelist: BuildingFunctionType
     externalReferences:
       label: Fachdatenverbindungen
       sourcePath: '[id=fk_feature]extref_building{sortKey=name}'
       type: OBJECT_ARRAY
       properties:
         name:
           label: Bezeichnung
           sourcePath: name
           type: STRING
         informationSystem:
           label: Informationssystem
           sourcePath: informationsystem
           type: STRING
     bezugspunktDach:
       label: Bezugspunkt Dach
       sourcePath: '[id=fk_feature]att_string_building{filter=name=''BezugspunktDach''}{sortKey=name}/value'
       type: STRING
       constraints:
         codelist: BezugspunktDach
     datenquelleBodenhoehe:
       label: Datenquelle Bodenhöhe
       sourcePath: '[id=fk_feature]att_string_building{filter=name=''DatenquelleBodenhoehe''}{sortKey=name}/value'
       type: STRING
       constraints:
         codelist: DatenquelleBodenhoehe
     datenquelleDachhoehe:
       label: Datenquelle Dachhöhe
       sourcePath: '[id=fk_feature]att_string_building{filter=name=''DatenquelleDachhoehe''}{sortKey=name}/value'
       type: STRING
       constraints:
         codelist: DatenquelleDachhoehe
     datenquelleLage:
       label: Datenquelle Lage
       sourcePath: '[id=fk_feature]att_string_building{filter=name=''DatenquelleLage''}{sortKey=name}/value'
       type: STRING
       constraints:
         codelist: DatenquelleLage
     gemeindeschluessel:
       label: Gemeindeschlüssel
       sourcePath: '[id=fk_feature]att_string_building{filter=name=''Gemeindeschluessel''}{sortKey=name}/value'
       type: STRING
     address:
       label: Adresse
       sourcePath: '[id=fk_feature]address{sortKey=id}'
       type: OBJECT_ARRAY
       properties:
         id:
           label: Objekt-ID
           sourcePath: id
           type: INTEGER
           transformations:
             remove: ALWAYS
         multiPoint:
           sourcePath: multipoint
           type: GEOMETRY
           geometryType: MULTI_POINT
           forcePolygonCCW: false
         ThoroughfareName:
           label: Straße
           sourcePath: street
           type: STRING
         ThoroughfareNumber:
           label: Hausnummer
           sourcePath: code
           type: STRING
         PostalCode:
           label: Postleitzahl
           sourcePath: postalcode
           type: STRING
         LocalityName:
           label: Stadt
           sourcePath: city
           type: STRING
         AdministrativeArea:
           label: Verwaltungsbezirk
           sourcePath: administrativearea
           type: STRING
         CountryName:
           label: Land
           sourcePath: country
           type: STRING
     lod1Solid:
       label: Geometrie (LoD 1)
       sourcePath: lod1solid
       type: GEOMETRY
       geometryType: MULTI_POLYGON
       forcePolygonCCW: false
     lod1TerrainIntersection:
       sourcePath: lod1terrainintersection
       type: GEOMETRY
       geometryType: MULTI_LINE_STRING
       forcePolygonCCW: false
     lod2Solid:
       label: Geometrie (LoD 2)
       sourcePath: lod2solid
       type: GEOMETRY
       geometryType: MULTI_POLYGON
       forcePolygonCCW: false
     surfaces:
       label: Begrenzungsflächen (LoD 2)
       sourcePath: '[id=fk_feature]building_surface{sortKey=gml_id}'
       type: OBJECT_ARRAY
       properties:
         gml_id:
           label: ID
           sourcePath: gml_id
           type: STRING
         creationDate:
           label: Erzeugungsdatum
           sourcePath: creation
           type: DATE
           transformations:
             dateFormat: 'yyyy-MM-dd'
         surfaceType:
           label: Flächentyp
           sourcePath: surface_type
           type: STRING
         lod2MultiSurface:
           label: Geometrie (LoD 2)
           sourcePath: geom
           type: GEOMETRY
           geometryType: MULTI_POLYGON
           forcePolygonCCW: false
     lod2TerrainIntersection:
       sourcePath: lod2terrainintersection
       type: GEOMETRY
       geometryType: MULTI_LINE_STRING
       forcePolygonCCW: false
     fk_buildingpart_parent:
       label: Gebäude-Objekt-ID
       sourcePath: fk_buildingpart_parent
       type: INTEGER
     consistsOfBuildingPart:
       label: Gebäudeteile
       sourcePath: '[id=fk_buildingpart_parent]building'
       type: OBJECT_ARRAY
       objectType: BuildingPart
       properties:
         id:
           label: Objekt-ID
           sourcePath: id
           type: INTEGER
         gml_id:
           label: ALKIS-ID
           sourcePath: gml_id
           type: STRING
         name:
           label: Name
           sourcePath: feature_name
           type: STRING
         lod12GroundSurface:
           sourcePath: lod12groundsurface
           type: GEOMETRY
           geometryType: MULTI_POLYGON
         measuredHeight:
           label: Gebäudehöhe [m]
           sourcePath: measuredheight
           type: FLOAT
         storeysAboveGround:
           label: Geschosse
           sourcePath: storeysaboveground
           type: INTEGER
         roofType:
           label: Dachform
           description: 'Die Bedeutung der einzelnen Werte ergibt aus der Codelist <a href="https://repository.gdi-de.org/schemas/adv/citygml/Codelisten/RoofTypeTypeAdV.xml"  target="_blank" >RoofTypeTypeAdV.xml</a>.'
           sourcePath: rooftype
           type: STRING
           constraints:
             codelist: RoofType
         creationDate:
           label: Erzeugungsdatum
           sourcePath: creation
           type: DATE
         function:
           label: Gebäudefunktion
           sourcePath: function
           type: STRING
           constraints:
             codelist: BuildingFunctionType
         externalReferences:
           label: Fachdatenverbindungen
           sourcePath: '[id=fk_feature]extref_building{sortKey=name}'
           type: OBJECT_ARRAY
           properties:
             name:
               label: Bezeichnung
               sourcePath: name
               type: STRING
             informationSystem:
               label: Informationssystem
               sourcePath: informationsystem
               type: STRING
         bezugspunktDach:
           label: Bezugspunkt Dach
           sourcePath: '[id=fk_feature]att_string_building{filter=name=''BezugspunktDach''}{sortKey=name}/value'
           type: STRING
           constraints:
             codelist: BezugspunktDach
         datenquelleBodenhoehe:
           label: Datenquelle Bodenhöhe
           sourcePath: '[id=fk_feature]att_string_building{filter=name=''DatenquelleBodenhoehe''}{sortKey=name}/value'
           type: STRING
           constraints:
             codelist: DatenquelleBodenhoehe
         datenquelleDachhoehe:
           label: Datenquelle Dachhöhe
           sourcePath: '[id=fk_feature]att_string_building{filter=name=''DatenquelleDachhoehe''}{sortKey=name}/value'
           type: STRING
           constraints:
             codelist: DatenquelleDachhoehe
         datenquelleLage:
           label: Datenquelle Lage
           sourcePath: '[id=fk_feature]att_string_building{filter=name=''DatenquelleLage''}{sortKey=name}/value'
           type: STRING
           constraints:
             codelist: DatenquelleLage
         address:
           label: Adresse
           sourcePath: '[id=fk_feature]address{sortKey=id}'
           type: OBJECT_ARRAY
           properties:
             id:
               label: Objekt-ID
               sourcePath: id
               type: INTEGER
               transformations:
                 remove: ALWAYS
             multiPoint:
               sourcePath: multipoint
               type: GEOMETRY
               geometryType: MULTI_POINT
               forcePolygonCCW: false
             ThoroughfareName:
               label: Straße
               sourcePath: street
               type: STRING
             ThoroughfareNumber:
               label: Hausnummer
               sourcePath: code
               type: STRING
             PostalCode:
               label: Postleitzahl
               sourcePath: postalcode
               type: STRING
             LocalityName:
               label: Stadt
               sourcePath: city
               type: STRING
             AdministrativeArea:
               label: Verwaltungsbezirk
               sourcePath: administrativearea
               type: STRING
             CountryName:
               label: Land
               sourcePath: country
               type: STRING
         lod1Solid:
           label: Geometrie (LoD 1)
           sourcePath: lod1solid
           type: GEOMETRY
           geometryType: MULTI_POLYGON
           forcePolygonCCW: false
         lod1TerrainIntersection:
           sourcePath: lod1terrainintersection
           type: GEOMETRY
           geometryType: MULTI_LINE_STRING
           forcePolygonCCW: false
         lod2Solid:
           label: Geometrie (LoD 2)
           sourcePath: lod2solid
           type: GEOMETRY
           geometryType: MULTI_POLYGON
           forcePolygonCCW: false
         surfaces:
           label: Begrenzungsflächen (LoD 2)
           sourcePath: '[id=fk_feature]building_surface{sortKey=gml_id}'
           type: OBJECT_ARRAY
           properties:
             gml_id:
               label: ID
               sourcePath: gml_id
               type: STRING
             creationDate:
               label: Erzeugungsdatum
               sourcePath: creation
               type: DATE
               transformations:
                 dateFormat: 'yyyy-MM-dd'
             surfaceType:
               label: Flächentyp
               sourcePath: surface_type
               type: STRING
             lod2MultiSurface:
               label: Geometrie (LoD 2)
               sourcePath: geom
               type: GEOMETRY
               geometryType: MULTI_POLYGON
               forcePolygonCCW: false
         lod2TerrainIntersection:
           sourcePath: lod2terrainintersection
           type: GEOMETRY
           geometryType: MULTI_LINE_STRING
           forcePolygonCCW: false
         fk_buildingpart_parent:
           label: Gebäude-Objekt-ID
           sourcePath: fk_buildingpart_parent
           type: INTEGER
           transformations:
             remove: ALWAYS