Features - CityJSONspecstableimplcandidate
Encode CityGML building features (LoD1, LoD2) as CityJSON.
Scope
The building block Features CityJSON adds support for CityJSON 1.0 and 1.1 as a feature encoding. Supported are the feature types Building
and BuildingPart
.
Limitations
Support is restricted to LoD1 and LoD2 buildings with building parts. All other object types including Appearance objects are not supported.
Conformance Classes
Features - CityJSON implements support for CityJSON 1.0 and CityJSON 1.1.
Configuration
Prerequisites
The building block requires that the feature provider includes a type building
that is mapped to a CityJSON Building feature. Properties of the type building
are mapped to CityJSON as follows:
consistsOfBuildingPart
: The value must be an object with the same properties asbuilding
.
The object is encoded as a BuildingPart feature of the Building feature.address
: The value must be an array of address objects. The following attributes are mapped
to an Address object, all other properties are ignored:multiPoint
: a MULTI_POINT geometry representing the address locationThoroughfareName
: a stringThoroughfareNumber
: a stringLocalityName
: a stringPostalCode
: a stringAdministrativeArea
: a stringCountryName
: a string
lod1Solid
: a closed MULTI_POLYGON geometry that represents the shell of the building at LoD 1.lod2Solid
: a closed MULTI_POLYGON geometry that represents the shell of the building at LoD 2.surfaces
: an array of semantic surface objects. The object must have asurfaceType
and the
values must be one of the following:CeilingSurface
,ClosureSurface
,Door
,FloorSurface
,GroundSurface
,InteriorWallSurface
,OuterCeilingSurface
,OuterFloorSurface
,RoofSurface
,WallSurface
, orWindow
. The object should have a property with a POLYGON or MULTI_POLYGON
geometry that represents the surface geometry.- all other properties: The property will be mapped to a CityJSON attribute, except for
gml_id
properties.
The property of the building
with the role ID
will be used as the CityJSON id. Since the embedded building parts do not have a property with a role ID
, the building part feature will use the value of a property id
as the id of the CityJSON building part, otherwise a UUID will be generated. If id
is provided, its values must be unique.
The example includes a sample type definition for the building features in a PostgreSQL feature provider based on the CityGML profile of the German surveying and mapping authorities.
Options
Name | Default | Description | Type | Since |
---|---|---|---|---|
buildingBlock | Always CITY_JSON . | string | v2.0 | |
enabled | false | Enable the building block? | boolean | 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 |
defaultProfiles | {} | Allows to change the default value of the profile parameter for a specific format. The key is the kind of profile, e.g. rel or val . The value is the default profile value, e.g. rel-as-uri or val-as-title . If only some or no profile kinds are set, the application defaults apply. | object | v4.2 |
textSequences | false | Enables support for CityJSON text sequences (media type application/city+json-seq ). Requires version 1.1 or later. | boolean | v3.3 |
version | V11 | Select the CityJSON version that should be returned. Supported versions are V10 (CityJSON 1.0) and V11 (CityJSON 1.1). | string | v3.3 |
Examples
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