https://github.com/3dcitydb/citydb-tool
3D City Database 5.0 CLI to import/export city model data and to run database operations
https://github.com/3dcitydb/citydb-tool
Last synced: 11 months ago
JSON representation
3D City Database 5.0 CLI to import/export city model data and to run database operations
- Host: GitHub
- URL: https://github.com/3dcitydb/citydb-tool
- Owner: 3dcitydb
- License: apache-2.0
- Created: 2023-11-19T12:29:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-16T05:51:12.000Z (over 2 years ago)
- Last Synced: 2024-04-16T08:13:02.618Z (over 2 years ago)
- Language: Java
- Size: 6.62 MB
- Stars: 6
- Watchers: 11
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
 [](https://github.com/users/3dcitydb/packages/container/package/citydb-tool)
# citydb-tool
3D City Database 5.0 CLI to import/export city model data and to run database operations.
## License
The citydb-tool is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
See the `LICENSE` file for more details.
## Latest release
The latest stable release of citydb-tool is `1.0.0`.
Download the latest citydb-tool release as ZIP package
[here](https://github.com/3dcitydb/citydb-tool/releases/latest). Previous releases are available from the
[releases section](https://github.com/3dcitydb/citydb-tool/releases).
## Contributing
* To file bugs found in the software create a GitHub issue.
* To contribute code for fixing filed issues create a pull request with the issue id.
* To propose a new feature create a GitHub issue and open a discussion.
## Using
Download and unzip the latest release or [build](https://github.com/3dcitydb/citydb-tool#building) the program from
source. Afterwards, open a shell environment and run the `citydb` script from the program folder to launch the
program. Another option is to use the citydb-tool [Docker image](https://github.com/3dcitydb/citydb-tool#docker).
To show the help message and all available commands of the citydb-tool, simply type the following:
> citydb --help
This will print the following usage information:
```
Usage: citydb [OPTIONS] COMMAND
Command-line interface for the 3D City Database.
[@...] One or more argument files containing options.
--config-file= Load configuration from this file.
-L, --log-level= Log level: fatal, error, warn, info, debug, trace
(default: info).
--log-file= Write log messages to this file.
--pid-file= Create a file containing the process ID.
--plugins= Load plugins from this directory.
--use-plugins= citydb help COMMAND
## System requirements
* Java 17 or higher
The citydb-tool can be run on any platform providing appropriate Java support.
## Docker
citydb-tool is available as Docker image. You can either build your own image using the provided Dockerfile
or use a pre-built image from [Dockerhub](https://hub.docker.com/r/3dcitydb/citydb-tool) or
[GitHub packages](https://github.com/3dcitydb/citydb-tool/pkgs/container/citydb-tool). The pre-built image supports
common architectures (`amd64`, `arm64`) can can be pulled with:
docker pull 3dcitydb/citydb-tool
docker pull ghcr.io/3dcitydb/citydb-tool
### Synopsis
The Docker image exposes the commands of the `citydb-tool`, as described
in the [usage section](https://github.com/3dcitydb/citydb-tool#usage).
The environment variables listed below can be used to specify a 3DCityDB v5 connection. To exchange data with the
container, mount a host folder to `/data` inside the container.
docker run --rm --name citydb-tool [-i -t] \
[-e CITYDB_HOST=the.host.de] \
[-e CITYDB_PORT=5432] \
[-e CITYDB_NAME=theDBName] \
[-e CITYDB_SCHEMA=theCityDBSchemaName] \
[-e CITYDB_USERNAME=theUsername] \
[-e CITYDB_PASSWORD=theSecretPass] \
[-e CITYDB_CONN_PROPS=connProperties] \
[-v /my/data/:/data] \
3dcitydb/citydb-tool[:TAG] COMMAND
## Building
The citydb-tool uses [Gradle](https://gradle.org/) as build system. To build the program from source, clone the repository to your
local machine and run the following command from the root of the repository.
> gradlew installDist
The script automatically downloads all required dependencies for building and running the citydb-tool. So make sure you
are connected to the internet. The build process runs on all major operating systems and only requires a Java 11 JDK or
higher to run.
If the build was successful, you will find the citydb-tool package under `citydb-cli/build/install`.