AdV CityGML Export
The export citygml-adv command of the AdV plugin extends the export command of
vcdb-tool and enables the AdV-compliant output of 3D building models from the VCDB v5. Compared to the existing
CityGML export command, the export citygml-adv command applies strict filter
criteria. As a result, only the feature types, attributes, and geometries permitted under the AdV CityGML 3.0 format
are exported. Further requirements regarding metadata as well as decimal places for coordinates and measured values
are also automatically taken into account.
| The export command of the AdV plugin ensures the structural content of the output format. However, the data is not validated against the AdV PQS standard. |
Options
The export citygml-adv command offers the same options as the export 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 export options
| Option | Description | Default value |
|---|---|---|
|
Name of the output file. |
|
|
Encoding to use for the output file. |
|
|
Fail fast on errors. |
|
|
Store temporary files in this directory. |
|
|
Number of threads to use for parallel processing. |
|
|
SRID or identifier of the CRS to use for the coordinates of geometries. |
VCDB CRS |
|
Name of the CRS to use in the output file. |
|
|
Transform coordinates using a 3x4 matrix in row-major order. Use |
For more details on the general export options and usage hints, see here.
CityGML export options
| Option | Description | Default value |
|---|---|---|
|
CityGML version: |
|
|
Format and indent output file. |
|
|
Apply XSLT stylesheets to transform output. |
For more details on the CityGML export 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.
Query and filter options
| Option | Description | Default value |
|---|---|---|
|
Names of the features to process. |
|
|
Filter to apply when retrieving features. Use the extended CQL2 filtering language of the VCDB. |
|
|
SRID or identifier of the CRS to use for geometries in the filter expression. |
VCDB CRS |
|
SQL query expression to use as filter. |
|
|
Properties and sort orders for sorting features. |
|
|
Maximum number of features to process. |
|
|
Index within the input set from which features are processed. |
|
|
Export geometries with a matching LoD. |
|
|
LoD filter mode: |
|
|
Levels of sub-features to search for matching LoDs |
0 |
|
Do not process appearances. |
|
|
Process appearances with a matching theme. Use |
For more details on the query and filter options and usage hints, see here.
Time-based feature history options
| Option | Description | Default value |
|---|---|---|
|
Process features by validity: |
|
|
Check validity at a specific point in time. If provided, the time must be in |
|
|
Validity time reference: |
|
|
Ignore incomplete validity intervals of features. |
For more details on the time-based feature history options and usage hints, see here.
Tiling options
| Option | Description | Default value |
|---|---|---|
|
Export tiles in a columns x rows grid. |
|
|
Export tiles with specified width and height, aligned with the database CRS grid (default length unit of the CRS assumed). |
|
|
Extent to use for tiling. |
auto-computed |
|
Tile indexes origin: |
|
For more details on the tiling 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
export citygml command here.
|
Feature and attribute filtering
The export citygml-adv command restricts the export to the feature types and attributes specified by the AdV PQS
standard, as well as the predefined geometry representations and LoD levels. Additional feature types and attributes
in the database that go beyond the requirements of the AdV PQS standard are generally not output. This ensures that
every export produced with the AdV plugin conforms to the AdV CityGML 3.0 format.
The feature type filter via the --type-name option is therefore only usable to a limited extent, since only
permitted feature types are accepted. For example, an AdV export can be restricted to bldg:Building or
con:OtherConstruction objects via --type-name. Other CityGML feature types, such as
veg:SolitaryVegetationObject, are not exported even if they are specified in the feature type filter, since they
are not part of the AdV standard.
The LoD filter via the --lod option is likewise restricted to the AdV-compliant LoD levels.
For the output of attributes, the export citygml-adv command allows the following exceptions:
-
Attribute mapping: Existing attributes in the database can be mapped to an AdV-compliant attribute before output. This allows the content of other attributes to be used for an AdV-compliant export without having to rename these attributes in the database.
-
Attribute filter: Using the
export citygml-advcommand’s own attribute filters, you can specify that certain attributes are exported anyway or excluded from the export.
The attribute mapping and attribute filters are defined in the JSON configuration of the export citygml-adv
command and are described in more detail here.
| The use of attribute filters can cause the resulting output file to no longer comply with the requirements of the AdV CityGML 3.0 format and therefore no longer be AdV-compliant. |
| Within the scope of the AdV standard’s requirements, all filter options can be used. The documentation of the export command’s general query and filter options can be found here. |
CityGML version
The AdV standard fixes the CityGML version of the output file to CityGML 3.0. Specifying a different target version
via the --citygml-version option therefore always results in an error message and aborts the export process.
Decimal places
In accordance with the requirements of the AdV standard, the decimal places of coordinates and measured values, such
as the building height (con:Height/con:value), are limited to three decimal places.
Adjustments to attribute values
For the following attributes, fixed requirements of the AdV standard apply during export, even if the database contains different values:
-
The
con:highReferenceof the building height is set totopOfConstruction. -
The
con:lowReferenceof the building height is set tolowestGroundPoint. -
The
con:statusof the building height is set depending on the generic attributeDatenquelleDachhoehe:-
estimated: For a value of 3000. -
measured: For all other values.
-
-
The
con:valueof the building height receives the valueurn:adv:uom:mas its unit. -
The
core:informationSystemof external references is not output. -
Date and time values are serialized without a time zone offset.
File metadata
For each output file, the export command sets the following metadata in the core:CityModel root element:
-
File name without file extension as
gml:name. -
Bounding box of the file as
gml:Envelope. The bounding box is calculated across all objects in the file and therefore does not correspond merely to the tile boundaries of a tiled export. -
Coordinate reference system (CRS) as the
srsNameattribute of thegml:Envelopeelement.
The identifier of the database CRS, which was specified when setting up the VCDB instance and is stored in the
DATABASE_SRS table, is used to specify the CRS. If a different
CRS identifier should be used for the export, it can be specified using the --crs-name option.
|
Tiled export
The tile and file name structure for exports from the VCDB v5 is not prescribed by the export citygml-adv
command but can be freely chosen, as with a regular CityGML export. This allows both single files and tiled exports.
The options of the export citygml-adv command make it easy to implement the AdV requirements for tiled data
delivery:
-
--tile-dimension: Sets the width and height of the resulting tiles. For an export with a tile grid of 1x1 km, the value must be set to1000,1000or1km,1km. For the output of tiles measuring 2x2 km, the value must be set accordingly to2000,2000or2km,2km. -
--skip-empty-tiles: Can optionally be specified if empty tiles should be deleted automatically.
Furthermore, the file name of each tile file is expected to follow this format:
LoD<Level>_<UTM-Zone>_<East>_<North>_<edge length>_<state>.gml
The values for the placeholders <Level>, <UTM-Zone>, <edge length>, and <state> are identical for all tile
files and can therefore be fixed in the file name. Only the <East> and <North> placeholders are dynamic and
depend on the tile currently being processed. For this purpose, the export command of vcdb-tool already supports
predefined placeholders in the file name, which are replaced by the corresponding tile values at runtime.
The following placeholders must be used for an AdV-compliant output:
| AdV token | Description | vcdb-tool token |
|---|---|---|
|
3-digit easting of the lower-left corner in kilometers. |
|
|
4-digit northing of the lower-left corner in kilometers. |
|
| All options for tiled exports are described in detail in the export command of vcdb-tool. |
Example
The following example shows how to invoke the export citygml-adv command for a tiled export of the German federal
state of Schleswig-Holstein (SH) at LoD 2 and UTM zone 32, with a tile edge length of 2km. Empty tiles are to
be removed automatically, and the CRS identifier in the output files is to be set to ETRS89_UTM32*DE_DHHN2016_NH.
-
Linux
-
Windows CMD
./vcdb export citygml-adv [...] \
-H my_server -d my_database -u my_user -p my_password \
--crs-name=ETRS89_UTM32*DE_DHHN2016_NH \
--tile-dimension=2000,2000 \
--skip-empty-tiles \
-o /my/path/LoD2_32_@x_min,%3.3s@_@y_min,%4.4s@_2_SH.gml
vcdb export citygml-adv [...] ^
-H my_server -d my_database -u my_user -p my_password ^
--crs-name=ETRS89_UTM32*DE_DHHN2016_NH ^
--tile-dimension=2000,2000 ^
--skip-empty-tiles ^
-o C:\my\path\LoD2_32_@x_min,%3.3s@_@y_min,%4.4s@_2_SH.gml