Commit bdb267ae authored by Matthias Betz's avatar Matthias Betz
Browse files

Merge branch 'master' into dev

parents 5b46132b 0b601bff
Pipeline #8775 passed with stage
in 54 seconds
......@@ -18,16 +18,39 @@
package de.hft.stuttgart.citydoctor2.utils;
public class Copy {
private Copy() {
public static <T extends Copyable> T copy(T original) {
CopyHandler handler = new CopyHandler();
return handler.copy(original);
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
ObjectOutputStream oos = new ObjectOutputStream(out);
byte[] byteArray = out.toByteArray();
ByteArrayInputStream in = new ByteArrayInputStream(byteArray);
ObjectInputStream ois = new ObjectInputStream(in);
return (T) ois.readObject();
} catch (IOException e) {
} catch (ClassNotFoundException e) {
throw new IllegalStateException();
// CopyHandler handler = new CopyHandler();
// return handler.copy(original);
......@@ -18,6 +18,7 @@
package de.hft.stuttgart.citydoctor2.utils;
import java.util.List;
import de.hft.stuttgart.citydoctor2.datastructure.ConcretePolygon;
......@@ -30,7 +31,9 @@ import de.hft.stuttgart.citydoctor2.math.Segment3d;
* @author Matthias Betz
public class PolygonIntersection {
public class PolygonIntersection implements Serializable {
private static final long serialVersionUID = -6301963226688351725L;
public enum IntersectionType {
......@@ -26,12 +26,14 @@ import org.junit.Test;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
import de.hft.stuttgart.citydoctor2.datastructure.GeometryTestUtils;
import de.hft.stuttgart.citydoctor2.datastructure.GeometryType;
import de.hft.stuttgart.citydoctor2.datastructure.GmlId;
public class CopyTest {
public void testCopy() {
Geometry geometry = GeometryTestUtils.createDummyGeometry(GeometryType.COMPOSITE_SURFACE);
geometry.setGmlId(new GmlId("test"));
Geometry copy = Copy.copy(geometry);
assertEquals(geometry.getType(), copy.getType());
assertEquals(geometry.getLod(), copy.getLod());
......@@ -4,10 +4,16 @@
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.
## Installation
## Releases
You can download releases from the BHT page [here]( or from a git repository [here](
Since version 3.12.0 CityDoctor2 requires java version 17, older version are based on version 1.8. The GUI version requires Javafx which is included in Java 1.8 but not in Java 17. You can download a Java version with Javafx included from [here]( Choose your platform and then choose to download the full JRE or JDK which includes Javafx.
The releases include builds for the validation library (CityDoctorValidation-x.x.x) and the grahpic user interface (CityDoctorGUI-x.x.x). While the GUI is not open source it is free to use.
## Build
Use [Maven]( to build CityDoctor2.
......@@ -19,9 +25,10 @@ CityDoctor2 uses the [quality ade plugin](
## Usage
Since version 3.12.0 CityDoctor2 requires java version 17, older version are based on version 1.8.
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:
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment