!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Deprecation notice: This repository has been deprecated on 6th of September 2021. The Docker images and this documentation will no longer be updated, because the content has moved to the official 3DCityDB repository. The old images will remain available on DockerHub, however, we recommend to migrate to the new version.
Please find the new Docker images and updated documentation here:
- Source code, Dockerfiles: https://github.com/3dcitydb/importer-exporter
- Documentation: https://3dcitydb-docs.readthedocs.io/en/latest/impexp/docker.html
- Docker image repository: https://hub.docker.com/repository/docker/3dcitydb/impexp
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Warning: This is a pre-release. The image has not jet been tested and this documentation is incomplete and possibly wrong!
A test image is available here: tumgis/3dcitydb-importer-exporter on DockerCloud.
This repo contains a Dockerfile for the 3D City Database (3DCityDB) Importer/Exporter. The images can be used to run the Importer/Exporter CLI and use the in automation processes. To get the 3DCityDB Importer/Exporter images visit the tumgis/3dcitydb-impexp DockerHub page. Currently, only the Importer/Exporter versions >= 4.0.0
are supported.
🚀 To get started immediately go to the quick start section. 🚀
Note: The content in this repo is in development stage. If you experience any problems or have a suggestion/improvement please let me know by creating an issue or make a contribution with a pull request.
- 2021-01 Implemented minimized Docker dist of Importer/Exporter
- 2020-12 Added Alpine image
- 2020-12 Reduced image size using multi stage builds
- 2020-11 Support for powerful new 3DCityDB Importer/Exporter CLI added
The Docker images are available on DockerHub from tumgis.
To get the image run: docker pull tumgis/3dcitydb-importer-exporter:<TAG>
Following tags are available:
-
Create a folder for exchanging data between the Importer/Exporter container and the Docker host, e.g.
/my/local/share/folder
. This folder will be mounted to the container later in the process. -
Run the Importer/Exporter docker image using the command below. Append the COMMAND, OPTIONS and ARGUMENTS as described in the Importer/Exporter CLI documentation below.
docker run --name impexp -i -t --rm \
-v /my/local/share/folder:/share \
tumgis/3dcitydb-importer-exporter COMMAND OPTS ARGS
docker run --name impexp -i -t --rm ^
-v /my/local/share/folder:/share ^
tumgis/3dcitydb-importer-exporter COMMAND OPTS ARGS
Check out the Docker images for the 3D City Database, 3D City Database Web Feature Service (WFS), and the 3D City Database Web-Map-Client too:
To be done!
This section contains the output of the Importer/Exporter CLI help
command.
Usage: impexp [-hV] [--ade-extensions=<folder>] [-c=<file>] [--log-file=<file>]
[--log-level=<level>] [--pid-file=<file>] [--plugins=<folder>]
[@<filename>...] COMMAND
Command-line interface for the 3D City Database.
[@<filename>...] One or more argument files containing options.
-c, --config=<file> Use configuration from this file.
--log-level=<level> Log level: error, warn, info, debug (default: info).
--log-file=<file> Write log messages to this file.
--pid-file=<file> Create a file containing the current process ID.
--plugins=<folder> Load plugins from this folder.
--ade-extensions=<folder>
Load ADE extensions from this folder.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
Commands:
help Displays help information about the specified command
import Imports data in CityGML or CityJSON format.
export Exports data in CityGML format.
export-vis Exports data in KML/COLLADA/glTF format for
visualization.
delete Deletes top-level city objects from the database.
validate Validates input files against their schemas.
gui Starts the graphical user interface.
spreadsheet-generate Generate spreadsheet from the database.
Usage: impexp import [-hV] [--ade-extensions=<folder>] [-c=<file>]
[--import-log=<file>] [--log-file=<file>]
[--log-level=<level>] [--pid-file=<file>]
[--plugins=<folder>] [--worker-threads=<threads[,max]>]
[[[-t=<[prefix:]name>[,<[prefix:]name>...]]...
[--namespace=<prefix=name>[,<prefix=name>...]]...] [-i=<id>
[,<id>...] [-i=<id>[,<id>...]]...] [-b=<minx,miny,maxx,maxy
[,srid]> [--bbox-mode=<mode>]] [[--count=<count>]
[--start-index=<index>]] [[--no-appearance]]]
[[-T=<database>] -H=<host> [-P=<port>] -d=<name>
[-S=<schema>] -u=<name> [-p[=<password>]]]
[@<filename>...] <file>...
Imports data in CityGML or CityJSON format.
[@<filename>...] One or more argument files containing options.
<file>... Files or directories to import (glob patterns
allowed).
--import-log=<file> Record imported top-level features to this file.
--worker-threads=<threads[,max]>
Number of worker threads to use.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
-c, --config=<file> Use configuration from this file.
--log-level=<level> Log level: error, warn, info, debug (default:
info).
--log-file=<file> Write log messages to this file.
--pid-file=<file> Create a file containing the current process ID.
--plugins=<folder> Load plugins from this folder.
--ade-extensions=<folder>
Load ADE extensions from this folder.
Import filter options:
-t, --type-name=<[prefix:]name>[,<[prefix:]name>...]
Names of the top-level features to process.
--namespace=<prefix=name>[,<prefix=name>...]
Prefix-to-namespace mappings.
-i, --gml-id=<id>[,<id>...]
Process top-level features with a matching gml:id.
-b, --bbox=<minx,miny,maxx,maxy[,srid]>
Bounding box to use as spatial filter.
--bbox-mode=<mode> Bounding box filter mode: overlaps, within
(default: overlaps).
--count=<count> Maximum number of top-level features to import.
--start-index=<index> Index within the input set to import from.
--no-appearance Do not import appearance information.
Database connection options:
-T, --db-type=<database> Database type: postgresql, oracle (default:
postgresql).
-H, --db-host=<host> Name of the host on which the 3DCityDB is running.
-P, --db-port=<port> Port of the 3DCityDB server (default: 5432 | 1521).
-d, --db-name=<name> Name of the 3DCityDB database to connect to.
-S, --db-schema=<schema> Schema to use when connecting to the 3DCityDB
(default: citydb | username).
-u, --db-username=<name> Username to use when connecting to the 3DCityDB.
-p, --db-password[=<password>]
Password to use when connecting to the 3DCityDB
(leave empty to be prompted).
Usage: impexp export [-hV] [--ade-extensions=<folder>] [-c=<file>]
[--log-file=<file>] [--log-level=<level>] -o=<file>
[--output-encoding=<encoding>] [--pid-file=<file>]
[--plugins=<folder>] [--worker-threads=<threads[,max]>]
[[[-t=<[prefix:]name>[,<[prefix:]name>...]]...
[--namespace=<prefix=name>[,<prefix=name>...]]...] [-i=<id>
[,<id>...] [-i=<id>[,<id>...]]...] [--db-id=<id>[,<id>...]
[--db-id=<id>[,<id>...]]...] [-b=<minx,miny,maxx,maxy[,
srid]> [--bbox-mode=<mode>] [-g=<rows,columns>]]
[[--count=<count>] [--start-index=<index>]] [-l=<0..4>[,
<0..4>...] [-l=<0..4>[,<0..4>...]]... [--lod-mode=<mode>]
[--lod-search-depth=<0..n|all>]] [[--no-appearance] |
-a=<theme>[,<theme>...] [-a=<theme>[,<theme>...]]...]
[-s=<select>] [-q=<xml>]] [[-T=<database>] -H=<host>
[-P=<port>] -d=<name> [-S=<schema>] -u=<name> [-p
[=<password>]]] [@<filename>...]
Exports data in CityGML format.
[@<filename>...] One or more argument files containing options.
-o, --output=<file> Name of the output file.
--output-encoding=<encoding>
Encoding used for the output file (default: UTF-8).
--worker-threads=<threads[,max]>
Number of worker threads to use.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
-c, --config=<file> Use configuration from this file.
--log-level=<level> Log level: error, warn, info, debug (default:
info).
--log-file=<file> Write log messages to this file.
--pid-file=<file> Create a file containing the current process ID.
--plugins=<folder> Load plugins from this folder.
--ade-extensions=<folder>
Load ADE extensions from this folder.
Query and filter options:
-t, --type-name=<[prefix:]name>[,<[prefix:]name>...]
Names of the top-level features to process.
--namespace=<prefix=name>[,<prefix=name>...]
Prefix-to-namespace mappings.
-i, --gml-id=<id>[,<id>...]
Process top-level features with a matching gml:id.
--db-id=<id>[,<id>...] Process top-level features with a matching
database id.
-b, --bbox=<minx,miny,maxx,maxy[,srid]>
Bounding box to use as spatial filter.
--bbox-mode=<mode> Bounding box filter mode: overlaps, within
(default: overlaps).
-g, --bbox-tiling=<rows,columns>
Tile the bounding box into a rows x columns grid.
--count=<count> Maximum number of top-level features to process.
--start-index=<index> Index within the result set to process top-level
features from.
-l, --lod=<0..4>[,<0..4>...]
LoD representations to export.
--lod-mode=<mode> LoD filter mode: or, and, minimum, maximum
(default: or).
--lod-search-depth=<0..n|all>
Levels of sub-features to search for matching LoDs
(default: 1).
--no-appearance Do not export appearance information.
-a, --appearance-theme=<theme>[,<theme>...]
Only export appearances with a matching theme. Use
'none' for the null theme.
-s, --sql-select=<select> SQL select statement to use as filter.
-q, --xml-query=<xml> XML query expression to use as database query.
Database connection options:
-T, --db-type=<database> Database type: postgresql, oracle (default:
postgresql).
-H, --db-host=<host> Name of the host on which the 3DCityDB is running.
-P, --db-port=<port> Port of the 3DCityDB server (default: 5432 | 1521).
-d, --db-name=<name> Name of the 3DCityDB database to connect to.
-S, --db-schema=<schema> Schema to use when connecting to the 3DCityDB
(default: citydb | username).
-u, --db-username=<name> Username to use when connecting to the 3DCityDB.
-p, --db-password[=<password>]
Password to use when connecting to the 3DCityDB
(leave empty to be prompted).
Usage: impexp export-vis [-hjVz] [--ade-extensions=<folder>] [-c=<file>]
[--log-file=<file>] [--log-level=<level>] -o=<file>
[--pid-file=<file>] [--plugins=<folder>]
[--worker-threads=<threads[,max]>] [-D=<mode[=pixels]>
[,<mode[=pixels]>...] [-D=<mode[=pixels]>[,<mode
[=pixels]>...]]... -l=<0..4 | halod> [-a=<theme>]]
[[[-t=<[prefix:]name>[,<[prefix:]name>...]]...
[--namespace=<prefix=name>[,<prefix=name>...]]...]
[-i=<id>[,<id>...] [-i=<id>[,<id>...]]...] [-b=<minx,
miny,maxx,maxy[,srid]>] [-g=<rows,columns | auto
[=length]>]] [[-s] [--no-surface-normals] [-C] [-f=<0..
1>] [-x=<mode>] [--no-pot-atlases]] [-G
[--gltf-version=<version>] [--gltf-converter=<file>]
[--gltf-embed-textures] [--gltf-binary]
[--gltf-draco-compression] [-r]] [[-A=<mode>]
[-O=<number|globe|generic>]
[--google-elevation-api=<api-key>]
[--transform-height]] [[-T=<database>] -H=<host>
[-P=<port>] -d=<name> [-S=<schema>] -u=<name> [-p
[=<password>]]] [@<filename>...]
Exports data in KML/COLLADA/glTF format for visualization.
[@<filename>...] One or more argument files containing options.
-o, --output=<file> Name of the master KML output file.
-z, --kmz Compress KML/COLLADA output and save as KMZ.
-j, --json-metadata Write JSON metadata file.
--worker-threads=<threads[,max]>
Number of worker threads to use.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
-c, --config=<file> Use configuration from this file.
--log-level=<level> Log level: error, warn, info, debug (default:
info).
--log-file=<file> Write log messages to this file.
--pid-file=<file> Create a file containing the current process ID.
--plugins=<folder> Load plugins from this folder.
--ade-extensions=<folder>
Load ADE extensions from this folder.
Display options:
-D, --display-mode=<mode[=pixels]>[,<mode[=pixels]>...]
Display mode: collada, geometry, extruded,
footprint. Optionally specify the visibility in
terms of screen pixels (default: 0).
-l, --lod=<0..4 | halod> LoD to export from.
-a, --appearance-theme=<theme>
Appearance theme to use for COLLADA/glTF exports.
Use 'none' for the null theme.
Query and filter options:
-t, --type-name=<[prefix:]name>[,<[prefix:]name>...]
Names of the top-level features to process.
--namespace=<prefix=name>[,<prefix=name>...]
Prefix-to-namespace mappings.
-i, --gml-id=<id>[,<id>...]
Process top-level features with a matching gml:id.
-b, --bbox=<minx,miny,maxx,maxy[,srid]>
Bounding box to use as spatial filter.
-g, --tiling=<rows,columns | auto[=length]>
Tile the bounding box into a rows x columns grid
or use 'auto' to create tiles with a fixed side
length. Optionally specify the side length in
meters (default: 125).
COLLADA/glTF rendering options:
-s, --double-sided Force all surfaces to be double sided.
--no-surface-normals Do not generate surface normals.
-C, --crop-textures Crop texture images.
-f, --texture-scale-factor=<0..1>
Scale texture images by the given factor (default:
1.0).
-x, --texture-atlas=<mode> Texture atlas mode: none, basic, tpim,
tpim_wo_rotation (default: basic).
--no-pot-atlases Do not create power-of-two sized texture atlases.
glTF export options:
-G, --gltf Convert COLLADA output to glTF.
--gltf-version=<version>
glTF version: 1.0, 2.0 (default: 2.0).
--gltf-converter=<file>
Path to the COLLADA2GLTF converter executable.
--gltf-embed-textures Embed textures in glTF files.
--gltf-binary Output binary glTF.
--gltf-draco-compression
Output meshes using Draco compression (requires
glTF version 2.0).
-r, --remove-collada Only keep glTF and remove the COLLADA output.
Elevation options:
-A, --altitude-mode=<mode> Altitude mode: absolute, relative, clamp (default:
absolute).
-O, --altitude-offset=<number|globe|generic>
Apply offset to height values. Provide a number as
constant offset, 'globe' for zero elevation or
'generic' to use the generic attribute
GE_LoDn_zOffset as per-feature offset.
--google-elevation-api=<api-key>
Query the Google elevation API when no
GE_LoDn_zOffset attribute is available. Requires
an API key.
--transform-height Transform height to WGS84 ellipsoid height.
Database connection options:
-T, --db-type=<database> Database type: postgresql, oracle (default:
postgresql).
-H, --db-host=<host> Name of the host on which the 3DCityDB is running.
-P, --db-port=<port> Port of the 3DCityDB server (default: 5432 | 1521).
-d, --db-name=<name> Name of the 3DCityDB database to connect to.
-S, --db-schema=<schema> Schema to use when connecting to the 3DCityDB
(default: citydb | username).
-u, --db-username=<name> Username to use when connecting to the 3DCityDB.
-p, --db-password[=<password>]
Password to use when connecting to the 3DCityDB
(leave empty to be prompted).
Usage: impexp delete [-hvV] [--ade-extensions=<folder>] [-c=<file>]
[--log-file=<file>] [--log-level=<level>] [-m=<mode>]
[--pid-file=<file>] [--plugins=<folder>] [[[-t=<[prefix:]
name>[,<[prefix:]name>...]]... [--namespace=<prefix=name>[,
<prefix=name>...]]...] [-i=<id>[,<id>...] [-i=<id>[,
<id>...]]...] [--db-id=<id>[,<id>...] [--db-id=<id>[,
<id>...]]...] [-b=<minx,miny,maxx,maxy[,srid]>
[--bbox-mode=<mode>]] [[--count=<count>]
[--start-index=<index>]] [-s=<select>] [-q=<xml>]]
[-f=<file> [--delete-list-encoding=<encoding>] [-n=<name>]
[-I=<index>] [-C=<type>] [-D=<char>] [--[no-]header]
[--quote=<char>] [--comment-start=<marker>]]
[[-T=<database>] -H=<host> [-P=<port>] -d=<name>
[-S=<schema>] -u=<name> [-p[=<password>]]] [@<filename>...]
Deletes top-level city objects from the database.
[@<filename>...] One or more argument files containing options.
-m, --delete-mode=<mode> Delete mode: delete, terminate (default: delete).
-v, --preview Only check which top-level features would be
affected, but that the features will not be
deleted or terminated.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
-c, --config=<file> Use configuration from this file.
--log-level=<level> Log level: error, warn, info, debug (default:
info).
--log-file=<file> Write log messages to this file.
--pid-file=<file> Create a file containing the current process ID.
--plugins=<folder> Load plugins from this folder.
--ade-extensions=<folder>
Load ADE extensions from this folder.
Query and filter options:
-t, --type-name=<[prefix:]name>[,<[prefix:]name>...]
Names of the top-level features to process.
--namespace=<prefix=name>[,<prefix=name>...]
Prefix-to-namespace mappings.
-i, --gml-id=<id>[,<id>...]
Process top-level features with a matching gml:id.
--db-id=<id>[,<id>...] Process top-level features with a matching
database id.
-b, --bbox=<minx,miny,maxx,maxy[,srid]>
Bounding box to use as spatial filter.
--bbox-mode=<mode> Bounding box filter mode: overlaps, within
(default: overlaps).
--count=<count> Maximum number of top-level features to process.
--start-index=<index> Index within the result set to process top-level
features from.
-s, --sql-select=<select> SQL select statement to use as filter.
-q, --xml-query=<xml> XML query expression to use as database query.
Delete list options:
-f, --delete-list=<file> Name of the CSV file containing the delete list.
--delete-list-encoding=<encoding>
Encoding used for the CSV file (default: UTF-8).
-n, --id-column-name=<name>
Name of the id column.
-I, --id-column-index=<index>
Index of the id column (default: 1).
-C, --id-column-type=<type>
Type of id column value: gml, db (default: gml).
-D, --delimiter=<char> Delimiter to use for splitting lines (default: ,).
--[no-]header CSV file uses a header row (default: true).
--quote=<char> Character used as quote (default: ").
--comment-start=<marker>
Marker used to start a line comment (default: #).
Database connection options:
-T, --db-type=<database> Database type: postgresql, oracle (default:
postgresql).
-H, --db-host=<host> Name of the host on which the 3DCityDB is running.
-P, --db-port=<port> Port of the 3DCityDB server (default: 5432 | 1521).
-d, --db-name=<name> Name of the 3DCityDB database to connect to.
-S, --db-schema=<schema> Schema to use when connecting to the 3DCityDB
(default: citydb | username).
-u, --db-username=<name> Username to use when connecting to the 3DCityDB.
-p, --db-password[=<password>]
Password to use when connecting to the 3DCityDB
(leave empty to be prompted).
Usage: impexp validate [-hV] [--ade-extensions=<folder>] [-c=<file>]
[--log-file=<file>] [--log-level=<level>]
[--pid-file=<file>] [--plugins=<folder>]
[@<filename>...] <file>...
Validates input files against their schemas.
[@<filename>...] One or more argument files containing options.
<file>... Files or directories to validate (glob patterns
allowed).
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
-c, --config=<file> Use configuration from this file.
--log-level=<level> Log level: error, warn, info, debug (default: info).
--log-file=<file> Write log messages to this file.
--pid-file=<file> Create a file containing the current process ID.
--plugins=<folder> Load plugins from this folder.
--ade-extensions=<folder>
Load ADE extensions from this folder.
Usage: impexp gui [-hV] [--no-splash] [--ade-extensions=<folder>] [-c=<file>]
[--log-file=<file>] [--log-level=<level>] [--pid-file=<file>]
[--plugins=<folder>] [@<filename>...]
Starts the graphical user interface.
[@<filename>...] One or more argument files containing options.
--no-splash Hide the splash screen during startup.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
-c, --config=<file> Use configuration from this file.
--log-level=<level> Log level: error, warn, info, debug (default: info).
--log-file=<file> Write log messages to this file.
--pid-file=<file> Create a file containing the current process ID.
--plugins=<folder> Load plugins from this folder.
--ade-extensions=<folder>
Load ADE extensions from this folder.
Usage: impexp spreadsheet-generate [-hV] [--ade-extensions=<folder>] [-b=<minx,
miny,maxx,maxy[,srid]>] [-c=<file>]
[-D=<char>] [--log-file=<file>]
[--log-level=<level>] -o=<outputFile>
[--pid-file=<file>] [--plugins=<folder>]
--template=<templateFile> [[-t=<[prefix:]
name>[,<[prefix:]name>...]]...
[--namespace=<prefix=name>[,
<prefix=name>...]]...] [[-T=<database>]
-H=<host> [-P=<port>] -d=<name>
[-S=<schema>] -u=<name> [-p[=<password>]]]
[@<filename>...]
Generate spreadsheet from the database.
[@<filename>...] One or more argument files containing options.
--template=<templateFile>
Name of the template file.
-t, --type-name=<[prefix:]name>[,<[prefix:]name>...]
Names of the top-level features to process.
--namespace=<prefix=name>[,<prefix=name>...]
Prefix-to-namespace mappings.
-b, --bbox=<minx,miny,maxx,maxy[,srid]>
Bounding box to use as spatial filter.
-o, --output=<outputFile> Name of the output spreadsheet file with the
extension .csv or .xlsx
-D, --delimiter=<char> Delimiter to use for splitting lines in CSV file
(default: ',').
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
-c, --config=<file> Use configuration from this file.
--log-level=<level> Log level: error, warn, info, debug (default:
info).
--log-file=<file> Write log messages to this file.
--pid-file=<file> Create a file containing the current process ID.
--plugins=<folder> Load plugins from this folder.
--ade-extensions=<folder>
Load ADE extensions from this folder.
Database connection options:
-T, --db-type=<database> Database type: postgresql, oracle (default:
postgresql).
-H, --db-host=<host> Name of the host on which the 3DCityDB is running.
-P, --db-port=<port> Port of the 3DCityDB server (default: 5432 | 1521).
-d, --db-name=<name> Name of the 3DCityDB database to connect to.
-S, --db-schema=<schema> Schema to use when connecting to the 3DCityDB
(default: citydb | username).
-u, --db-username=<name> Username to use when connecting to the 3DCityDB.
-p, --db-password[=<password>]
Password to use when connecting to the 3DCityDB
(leave empty to be prompted).