diff --git a/CityDoctorParent/CityDoctorCheckResult/pom.xml b/CityDoctorParent/CityDoctorCheckResult/pom.xml index ae4395b2374c3c6ca44a335ce9c6fa2430c4da42..3ba2f10293123e24fd0dee01c89ddde163ef4357 100644 --- a/CityDoctorParent/CityDoctorCheckResult/pom.xml +++ b/CityDoctorParent/CityDoctorCheckResult/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>de.hft.stuttgart</groupId> <artifactId>CityDoctorParent</artifactId> - <version>3.7.0-SNAPSHOT</version> + <version>3.7.0</version> </parent> <artifactId>CityDoctorCheckResult</artifactId> diff --git a/CityDoctorParent/CityDoctorEdge/pom.xml b/CityDoctorParent/CityDoctorEdge/pom.xml index 309405e0f0680e20155e35760bc75293bc64a4ca..d674595e80f34cacc0c62bfa285fa85dc4500b0a 100644 --- a/CityDoctorParent/CityDoctorEdge/pom.xml +++ b/CityDoctorParent/CityDoctorEdge/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>de.hft.stuttgart</groupId> <artifactId>CityDoctorParent</artifactId> - <version>3.7.0-SNAPSHOT</version> + <version>3.7.0</version> </parent> <artifactId>CityDoctorEdge</artifactId> diff --git a/CityDoctorParent/CityDoctorModel/pom.xml b/CityDoctorParent/CityDoctorModel/pom.xml index 6aba7658a8eb86d767b0a7c577ef484fec7f9bfb..0fd0fc97b12637a53880cbd4c92cea3c2d1c72a6 100644 --- a/CityDoctorParent/CityDoctorModel/pom.xml +++ b/CityDoctorParent/CityDoctorModel/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>de.hft.stuttgart</groupId> <artifactId>CityDoctorParent</artifactId> - <version>3.7.0-SNAPSHOT</version> + <version>3.7.0</version> </parent> <properties> diff --git a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingInstallation.java b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingInstallation.java index 031c2acb8116516a97a7c6495ee2c645cbfb043c..4952285259ee0638de78f3fa3c713cf833d884a5 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingInstallation.java +++ b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingInstallation.java @@ -24,8 +24,11 @@ import java.util.List; import org.citygml4j.factory.GMLGeometryFactory; import org.citygml4j.model.citygml.building.AbstractBoundarySurface; import org.citygml4j.model.citygml.building.BoundarySurfaceProperty; +import org.citygml4j.model.gml.geometry.GeometryProperty; import org.citygml4j.model.gml.geometry.aggregates.MultiSurface; import org.citygml4j.model.gml.geometry.aggregates.MultiSurfaceProperty; +import org.citygml4j.model.gml.geometry.complexes.CompositeSurface; +import org.citygml4j.model.gml.geometry.complexes.CompositeSurfaceProperty; import de.hft.stuttgart.citydoctor2.check.Check; import de.hft.stuttgart.citydoctor2.check.CheckError; @@ -48,8 +51,11 @@ public class BuildingInstallation extends CityObject { if (geom.getType() == GeometryType.MULTI_SURFACE) { MultiSurface ms = CityGmlUtils.createMultiSurface(geom, factory, config); setGeometryAccordingToLod(geom.getLod(), new MultiSurfaceProperty(ms)); + } else if (geom.getType() == GeometryType.COMPOSITE_SURFACE) { + CompositeSurface cs = CityGmlUtils.createCompositeSurface(geom, factory, config); + setGeometryAccordingToLod(geom.getLod(), new CompositeSurfaceProperty(cs)); } else { - throw new IllegalStateException("BuildingInstallation can only have MultiSurface geometries"); + throw new IllegalStateException("BuildingInstallation not have Solid geometries"); } } for (BoundarySurface bs : boundarySurfaces) { @@ -62,7 +68,7 @@ public class BuildingInstallation extends CityObject { throw new UnsupportedOperationException("Cannot copy BuildingInstallation"); } - private void setGeometryAccordingToLod(Lod lod, MultiSurfaceProperty ms) { + private void setGeometryAccordingToLod(Lod lod, GeometryProperty<?> ms) { switch (lod) { case LOD2: gmlBi.setLod2Geometry(ms); diff --git a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/CityGmlUtils.java b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/CityGmlUtils.java index f861e4316fe5e59da455c45b4ac27227f7f44a9f..c33e60044a3ea3a551689ad7a9fe85e58a094f41 100644 --- a/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/CityGmlUtils.java +++ b/CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/CityGmlUtils.java @@ -176,4 +176,19 @@ public final class CityGmlUtils { return new MultiSurface(surfaces); } + public static CompositeSurface createCompositeSurface(Geometry geom, GMLGeometryFactory factory, + ParserConfiguration config) { + List<AbstractSurface> surfaces = new ArrayList<>(); + for (Polygon cdPoly : geom.getPolygons()) { + org.citygml4j.model.gml.geometry.primitives.Polygon gmlPoly = createGmlPolygon(factory, cdPoly, config); + if (gmlPoly != null) { + surfaces.add(gmlPoly); + } + } + if (surfaces.isEmpty()) { + return null; + } + return new CompositeSurface(surfaces); + } + } diff --git a/CityDoctorParent/CityDoctorValidation/pom.xml b/CityDoctorParent/CityDoctorValidation/pom.xml index f9c22c36c02f2648ef60ddf536f396581ea48bb8..b6bc3f108077787f63caf6d7b33d3180b0990a72 100644 --- a/CityDoctorParent/CityDoctorValidation/pom.xml +++ b/CityDoctorParent/CityDoctorValidation/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>de.hft.stuttgart</groupId> <artifactId>CityDoctorParent</artifactId> - <version>3.7.0-SNAPSHOT</version> + <version>3.7.0</version> </parent> <artifactId>CityDoctorValidation</artifactId> <name>CityDoctorValidation</name> diff --git a/CityDoctorParent/pom.xml b/CityDoctorParent/pom.xml index 8cca78d030f86c7bdfbf1b1e80a2065cf3a0888b..7ac74ebcd14d5c0de475817ce78d63f62f5ccd3c 100644 --- a/CityDoctorParent/pom.xml +++ b/CityDoctorParent/pom.xml @@ -4,7 +4,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>de.hft.stuttgart</groupId> <artifactId>CityDoctorParent</artifactId> - <version>3.7.0-SNAPSHOT</version> + <version>3.7.0</version> <packaging>pom</packaging> <name>CityDoctorParent</name> @@ -12,7 +12,7 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> - <revision>3.7.0-SNAPSHOT</revision> + <revision>${project.version}</revision> </properties> <build>