# CityDoctor2

[![pipeline status](https://transfer.hft-stuttgart.de/gitlab/betzms/citydoctor2/badges/master/pipeline.svg)](https://transfer.hft-stuttgart.de/gitlab/betzms/citydoctor2/-/commits/master) [![Latest Release](https://transfer.hft-stuttgart.de/gitlab/citydoctor/citydoctor2/-/badges/release.svg)](https://transfer.hft-stuttgart.de/gitlab/citydoctor/citydoctor2/-/releases)

CityDoctor2 is a Java program for validating CityGML files. It checks whether certain criteria for e.g. geometries are met and outputs a report on the results.

CityDoctor2 supports version 3.0 of CityGML, with backwards compatibility for versions 2.0 and 1.0.

CityDoctor2 requires Java version 17 or higher.

## Homepage

The [CityDoctor homepage](https://transfer.hft-stuttgart.de/pages/citydoctor/citydoctorhomepage/de/) contains detailed
installation instruction, as well as more information about the quality management process itself.

## Releases

The latest release of CityDoctor2 can be found under
the [Releases](https://transfer.hft-stuttgart.de/gitlab/citydoctor/citydoctor2/-/releases) tab.

Prebuilt binaries of the latest releases of the validation library (CityDoctorValidation-x.x.x) and the graphical user
interface (CityDoctorGUI-x.x.x) can be found in
this [gitlab repository](https://transfer.hft-stuttgart.de/gitlab/citydoctor/citydoctorreleases).

CityDoctor2 uses [Semantic Versioning](https://semver.org/).

### Older releases

Older versions of CityDoctor2, back to version 3.14.0, can also be found under Releases.

Versions older than 3.14.0 can be downloaded from the BHT
page [here](https://projekt.bht-berlin.de/citydoctor2/downloads/) or from a git
repository [here](https://gitlab.com/volkercoors/CiD4Sim/-/tree/master/CityDoctorExtension).

Versions older than 3.15.0 require a JDK/JRE with the JavaFx library.   
You can download a Java version with Javafx included from [here](https://bell-sw.com/pages/downloads/#/java-17-lts).

Versions older than 3.12.0 require Java version 8 or higher.

## Build

Use [Maven](https://maven.apache.org/) to build CityDoctor2.

```bash
cd CityDoctorParent
mvn install
```

CityDoctor2 uses the [quality ade plugin](https://transfer.hft-stuttgart.de/gitlab/betzms/qualityade). A jar is provided in a local repository for ease of use.

## Usage

Once built there is a CityDoctorValidation-\<version\>.zip file in the target folder of the CityDoctorValidation folder in which the CityDoctorValidation jar can be used to start the program.

There is a start script included in the binary releases of citydoctor. An example start command looks like this:

```bash
java -classpath libs/*;plugins/*;CityDoctorValidation-<version>.jar de.hft.stuttgart.citydoctor2.CityDoctorValidation -in <path-to-gml-file>.gml -config <path-to-validation-config>.yml -xmlReport <path-to-xml-output>.xml -pdfReport <path-to-pdf-output>.pdf -out <path-to-output-gml>.gml
```

Notes:

- -xmlReport, -pdfReport and -out are optional
- If a ZIP file is given as input, CityDoctor2 will check all contained CityGML files. The -out parameter is required in
  this case

## Extension modules

Example extensions for CityDoctor are included in this repository, and can be found in the [Extensions subdirectory](./CityDoctorParent/Extensions)
alongside a short description for each respective extension.

## License
[LGPL](http://www.gnu.org/licenses/lgpl-3.0.de.html)