AdV CityGML Import
The AdV plugin extends the import command of vcdb-tool with the citygml-adv
subcommand. It allows datasets in the AdV CityGML 1.0 format to be imported into the VCDB v5. Compared to the
existing CityGML import command, import citygml-adv automatically converts the
input data into the AdV CityGML 3.0 format. This particularly concerns the conversion of building models into
bridges or other constructions based on predefined values of the bldg:function attribute.
The input data for the import citygml-adv command should conform to the AdV PQS standard in version 2.6.
However, this is not mandatory. The import citygml-adv command also supports CityGML data that, for example,
contains feature types, LoD levels, or attributes that go beyond the AdV specification, or that is provided in
other CityGML versions.
|
Options
The import citygml-adv command offers the same options as the import citygml
command. The overview below is therefore provided mainly for completeness. Further settings can be defined via a
JSON configuration file.
Global options
| Option | Description | Default value |
|---|---|---|
|
One or more argument files containing options. |
|
|
Show a help message and exit. |
|
|
Print version information and exit. |
|
|
Load configuration from this file. |
|
|
Log level: |
|
|
Write log messages to this file. |
|
|
Disable console log messages. |
|
|
Create a file containing the process ID. |
|
|
Load extensions from this directory. |
|
|
Enable or disable plugins with a matching fully qualified class name. |
|
For more details on the global options and usage hints, see here.
General import options
| Option | Description | Default value |
|---|---|---|
|
One or more files and directories to process (glob patterns allowed). |
|
|
Encoding of input file(s). |
|
|
Fail fast on errors. |
|
|
Store temporary files in this directory. |
|
|
Import mode: |
|
|
Number of threads to use for parallel processing. |
|
|
Run in preview mode. Features will not be imported. |
|
|
Index mode: |
|
|
Compute and overwrite extents of features. |
|
|
Transform coordinates using a 3x4 matrix in row-major order. Use |
For more details on the general import options and usage hints, see here.
CityGML import options
| Option | Description | Default value |
|---|---|---|
|
Import XML snippets of xAL address elements. |
|
|
Apply XSLT stylesheets to transform input. |
|
|
Do not process appearances. |
|
|
Process appearances with a matching theme. Use |
For more details on the CityGML import options and usage hints, see here.
Metadata options
| Option | Description | Default value |
|---|---|---|
|
Time in |
attribute value or |
|
Lineage to use for the features. |
|
|
Name of the user responsible for the import. |
database user |
|
Reason for importing the data. |
For more details on the metadata options and usage hints, see here.
Upgrade options for CityGML 2.0 and 1.0
| Option | Description | Default value |
|---|---|---|
|
Use LoD4 as LoD3, replacing an existing LoD3. |
|
|
Map LoD0 roof edges onto roof surfaces. |
|
|
Map LoD1 multi-surfaces onto generic thematic surfaces. |
For more details on the upgrade options and usage hints, see here.
Filter options
| Option | Description | Default value |
|---|---|---|
|
Names of the features to process. |
|
|
Identifiers of the features to process. |
|
|
Bounding box to use as spatial filter. |
|
|
Bounding box mode: |
|
|
Maximum number of features to process. |
|
|
Index within the input set from which features are processed. |
For more details on the filter options and usage hints, see here.
Database connection options
| Option | Description | Default value |
|---|---|---|
|
Name of the host on which the VCDB is running. |
|
|
Port of the VCDB server. |
5432 |
|
Name of the VCDB database to connect to. |
|
|
Schema to use when connecting to the VCDB. |
|
|
Username to use when connecting to the VCDB. |
|
|
Password to use when connecting to the VCDB. Leave empty to be prompted. |
|
|
Database-specific connection properties. |
For more details on the database connection options and usage hints, see here.
Usage
For the documentation of the individual options and general usage hints, see the documentation for the
import citygml command here.
|
Unlike the regular CityGML import command, import citygml-adv converts building
models into a different CityGML feature type during import into the database if required by the AdV PQS standard
v3.0. To do this, every top-level object of type bldg:Building in the input data is examined and the associated
function code is read from the bldg:function attribute.
The function code is used to determine whether a conversion into a different feature type is required. The check is performed in the following order:
-
Conversion into a bridge (
brid:Bridge) -
Conversion into an other construction (
con:OtherConstruction) -
Retention of the object as
bldg:Building(default behavior)
Which function codes trigger the conversion of a building into brid:Bridge or con:OtherConstruction is defined
according to the AdV PQS standard. However, the list of function codes can be customized per feature type using the
JSON configuration.
Depending on the target feature type, different conversion steps are carried out, which are described in the following sections.
Retaining buildings
Conversion of feature types
When retaining a building, the feature types are reclassified for AdV CityGML 3.0 as follows:
| Source object | Target object |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Conversion of attributes
The following rules apply to the conversion of attributes:
-
Generic attributes are generally retained. The attribute values are not validated.
-
The following generic attributes are stored on the
bldg:BuildingPartin AdV CityGML 1.0 and must be merged onto thebldg:Buildingfor conversion to AdV CityGML 3.0. In case of conflicting attribute values, the following rules apply:-
DatenquelleBodenhoehe: The first value is retained. -
DatenquelleLage: The first value is retained. -
Grundrissaktualitaet: The oldest date is retained.
-
-
The generic attribute
LetzteAenderungis mandatory forbldg:Buildingobjects. If it is not set for the input object, it is added and populated with the value ofcore:creationDate. If that is also not present, the current date is used. -
For
core:ExternalReference, thecore:informationSystemattribute is removed. -
bldg:measuredHeightattributes are rewritten ascon:Height. Thestatusattribute is set depending on the generic attributeDatenquelleDachhoeheas follows:-
estimated: For a value of 3000. -
measured: For all other values.
-
-
Addresses of the building are retained.
Conversion into bridges
Conversion of feature types
When converting a building into a bridge, the building and its child objects are reclassified as follows:
| Source object | Target object |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Conversion of attributes
The following rules apply to the conversion of attributes:
-
Building-specific attributes from the
bldgnamespace are retained, provided a corresponding attribute exists for the bridge object. -
Generic attributes are generally retained. The attribute values are not validated.
-
The following generic attributes are stored on the
bldg:BuildingPartin AdV CityGML 1.0 and must be merged onto thebrid:Bridgefor conversion to AdV CityGML 3.0. In case of conflicting attribute values, the following rules apply:-
DatenquelleBodenhoehe: The first value is retained. -
DatenquelleLage: The first value is retained. -
Grundrissaktualitaet: The oldest date is retained.
-
-
The following generic attributes are not intended for bridges and are removed:
-
BezugspunktDach -
DatenquelleGeschossanzahl
-
-
The generic attribute
LetzteAenderungis mandatory forbrid:Bridgeobjects. If it is not set for thebldg:Building, it is added and populated with the value ofcore:creationDate. If that is also not present, the current date is used. -
Depending on the function code,
brid:isMovableis set totrueorfalse. -
For
core:ExternalReference, thecore:informationSystemattribute is removed. -
bldg:measuredHeightattributes are rewritten ascon:Height. Thestatusattribute is set depending on the generic attributeDatenquelleDachhoeheas follows:-
estimated: For a value of 3000. -
measured: For all other values.
-
-
Addresses of the building are retained for the bridge.
Retaining geometries
All geometries of the building object and its child objects are retained unchanged in the corresponding bridge
objects. This applies to all geometry types, such as gml:Solid and gml:MultiSurface, as well as gml:MultiCurve
geometries of terrain intersection curves. Geometry validation is not performed.
Conversion into other constructions
Conversion of feature types
When converting a building into an other construction, the building and its child objects are reclassified as follows:
| Source object | Target object |
|---|---|
|
|
|
merged into |
|
|
|
|
|
|
|
- |
Unlike bldg:Building, con:OtherConstruction does not allow further subdivision into construction parts.
Building parts therefore cannot be retained as such but are merged into the con:OtherConstruction object. For this
purpose, boundary surfaces of the bldg:BuildingPart objects are transferred into the con:OtherConstruction
object.
|
Conversion of attributes
The following rules apply to the conversion of attributes:
-
Building-specific attributes from the
bldgnamespace are retained, provided a corresponding attribute exists forcon:OtherConstruction. -
Generic attributes are generally retained. The attribute values are not validated.
-
The following generic attributes are stored on the
bldg:BuildingPartin AdV CityGML 1.0 and are merged for the conversion tocon:OtherConstruction. In case of conflicting attribute values, the following rules apply:-
DatenquelleDachhoehe: The first value is retained. -
BezugspunktDach: The first value is retained. -
DatenquelleBodenhoehe: The first value is retained. -
DatenquelleLage: The first value is retained. -
Grundrissaktualitaet: The oldest date is retained.
-
-
The following generic attributes are not intended for other constructions and are removed:
-
DatenquelleGeschossanzahl
-
-
The generic attribute
LetzteAenderungis mandatory forcon:OtherConstructionobjects. If it is not set for thebldg:Building, it is added and populated with the value ofcore:creationDate. If that is also not present, the current date is used. -
For
core:ExternalReference, thecore:informationSystemattribute is removed. -
bldg:measuredHeightattributes are rewritten ascon:Height. Thestatusattribute is set depending on the generic attributeDatenquelleDachhoeheas follows:-
estimated: For a value of 3000. -
measured: For all other values.
-
-
When merging building parts, the largest existing part height is used as the height of the construction.
-
Addresses of the building are not retained for
con:OtherConstruction.
Retaining geometries
The geometries of the building object are generally retained unchanged in con:OtherConstruction. This applies to
all geometry types, such as gml:Solid and gml:MultiSurface, as well as gml:MultiCurve geometries of terrain
intersection curves. Geometry validation is not performed.
If building parts are modeled, an additional conversion is required at the geometry level. The following rules apply
to merging the geometries in the con:OtherConstruction object:
-
Boundary surfaces of type
bldg:WallSurface,bldg:RoofSurface, andbldg:GroundSurface, including their geometry, are transferred intocon:OtherConstruction. -
The polygons of the transferred boundary surfaces are included as references in the LoD2
Solidgeometry of thecon:OtherConstruction. -
Boundary surfaces of type
bldg:ClosureSurfaceserve exclusively as a separating surface between twobldg:BuildingPartobjects. They are therefore removed entirely, including their geometry. -
The LoD1
Solidgeometries of the building parts are merged into a single LoD1Solidgeometry for thecon:OtherConstruction. -
Geometries of the terrain intersection curves of the building parts are merged into a single
gml:MultiCurvegeometry as the terrain intersection curve of thecon:OtherConstruction, separately for LoD2 and LoD1.
With valid input data, the merged geometries remain valid at LoD2 and LoD1. Only in the LoD1 Solid geometry
can duplicate polygons arise at the contact surfaces of the original building parts, which can render the solid
geometry invalid.
|
Logging
After a successful import, the AdV plugin writes the number of building objects that were converted into bridges or other constructions as a summary to the vcdb-tool log output. If no conversions took place, this is also logged.
If --log-level is set to debug, a log entry with the function code that triggered the conversion is additionally
written for each converted building.
The log output of the AdV plugin contains the [AdV] marker, making it easy to search and filter.
|