Commit 5571f382 authored by Luna Riegel's avatar Luna Riegel
Browse files

Merge branch 'dev' into 'master'

CityDoctor Version 3.18.0

See merge request !37
parents 87dba3fa 61859d4f
Pipeline #12247 passed with stage
in 2 minutes and 31 seconds
...@@ -16,13 +16,7 @@ ...@@ -16,13 +16,7 @@
<ImageView fx:id="openImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" /> <ImageView fx:id="openImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
</graphic> </graphic>
</Button> </Button>
<Button id="loadBtn" fx:id="zipManagerBtn" disable="true" mnemonicParsing="false"> <Separator layoutX="381.0" layoutY="10.0" orientation="VERTICAL" />
<graphic>
<ImageView fx:id="zipManagerView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true"
preserveRatio="true"/>
</graphic>
</Button>
<Separator layoutX="381.0" layoutY="10.0" orientation="VERTICAL"/>
<Button fx:id="checkBtn" mnemonicParsing="false"> <Button fx:id="checkBtn" mnemonicParsing="false">
<graphic> <graphic>
<ImageView fx:id="checkImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" /> <ImageView fx:id="checkImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
...@@ -33,7 +27,7 @@ ...@@ -33,7 +27,7 @@
<ImageView fx:id="reportImageView" disable="true" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" /> <ImageView fx:id="reportImageView" disable="true" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
</graphic> </graphic>
</Button> </Button>
<Separator layoutX="116.0" layoutY="10.0" orientation="VERTICAL"/> <Separator layoutX="116.0" layoutY="10.0" orientation="VERTICAL" />
<ToggleButton fx:id="gridButton" disable="true" mnemonicParsing="false"> <ToggleButton fx:id="gridButton" disable="true" mnemonicParsing="false">
<graphic> <graphic>
<ImageView fx:id="gridImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" /> <ImageView fx:id="gridImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
...@@ -86,7 +80,7 @@ ...@@ -86,7 +80,7 @@
</HBox> </HBox>
<HBox fx:id="spacer" alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" spacing="5.0" HBox.hgrow="ALWAYS"> <HBox fx:id="spacer" alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" spacing="5.0" HBox.hgrow="ALWAYS">
<children> <children>
<Separator orientation="VERTICAL"/> <Separator orientation="VERTICAL" />
<Button id="loadBtn" fx:id="saveBtn" disable="true" mnemonicParsing="false"> <Button id="loadBtn" fx:id="saveBtn" disable="true" mnemonicParsing="false">
<graphic> <graphic>
<ImageView fx:id="saveView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" /> <ImageView fx:id="saveView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
......
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.ProgressBar?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.TitledPane?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<VBox xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1">
<children>
<AnchorPane minHeight="32.0">
<children>
<HBox spacing="5.0" AnchorPane.leftAnchor="0.0">
<children>
<Button fx:id="loadBtn" alignment="CENTER" maxWidth="1.7976931348623157E308"
mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="loadImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true"
preserveRatio="true"/>
</graphic>
</Button>
<Button fx:id="decompressBtn" alignment="CENTER" maxWidth="1.7976931348623157E308"
mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="decompressImageView" fitHeight="32.0" fitWidth="32.0"
pickOnBounds="true" preserveRatio="true"/>
</graphic>
</Button>
<Button fx:id="showReportBtn" alignment="CENTER" maxWidth="1.7976931348623157E308"
mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="showReportImageView" fitHeight="32.0" fitWidth="32.0"
pickOnBounds="true" preserveRatio="true"/>
</graphic>
</Button>
<Separator orientation="VERTICAL"/>
<Button fx:id="decompressAllBtn" alignment="CENTER" maxWidth="1.7976931348623157E308"
mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="decompressAllImageView" fitHeight="32.0" fitWidth="32.0"
pickOnBounds="true" preserveRatio="true"/>
</graphic>
</Button>
<Button fx:id="checkAllBtn" alignment="CENTER" maxWidth="1.7976931348623157E308"
mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="checkAllImageView" fitHeight="32.0" fitWidth="32.0"
pickOnBounds="true" preserveRatio="true"/>
</graphic>
</Button>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
</padding>
</HBox>
<HBox alignment="TOP_RIGHT" layoutX="296.0" prefHeight="52.0" AnchorPane.rightAnchor="0.0">
<children>
<Button fx:id="saveBtn" alignment="CENTER" maxWidth="1.7976931348623157E308"
mnemonicParsing="false">
<font>
<Font size="14.0"/>
</font>
<graphic>
<ImageView fx:id="saveImageView" fitHeight="32.0" fitWidth="32.0" pickOnBounds="true"
preserveRatio="true"/>
</graphic>
</Button>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
</padding>
</HBox>
</children>
</AnchorPane>
<HBox fillHeight="false" prefHeight="200.0" prefWidth="600.0" VBox.vgrow="ALWAYS">
<children>
<TitledPane fx:id="entriesPane" collapsible="false" text="Zip-entries" HBox.hgrow="ALWAYS">
<font>
<Font size="14.0"/>
</font>
<content>
<ListView fx:id="entryList" prefWidth="300.0"/>
</content>
</TitledPane>
<TitledPane fx:id="metadataPane" collapsible="false" layoutX="10.0" layoutY="10.0" prefWidth="300.0"
text="Metadata" HBox.hgrow="ALWAYS">
<font>
<Font size="14.0"/>
</font>
<content>
<HBox>
<children>
<VBox spacing="5.0">
<children>
<Label fx:id="subpathLbl" alignment="CENTER" text="Subpath:">
<font>
<Font size="14.0"/>
</font>
</Label>
<Label fx:id="erroneousLbl" text="Erroneous:">
<font>
<Font size="14.0"/>
</font>
<padding>
<Insets top="7.0"/>
</padding>
</Label>
<Label fx:id="filesizeLbl" text="Filesize:">
<font>
<Font size="14.0"/>
</font>
</Label>
<Label fx:id="validatedLbl" layoutX="10.0" layoutY="67.0" text="Validated:">
<font>
<Font size="14.0"/>
</font>
</Label>
<Label fx:id="objectCountLbl" layoutX="10.0" layoutY="67.0"
text="Object count:">
<font>
<Font size="14.0"/>
</font>
</Label>
</children>
</VBox>
<VBox prefHeight="147.0" prefWidth="189.0" spacing="5.0">
<children>
<TextField fx:id="subpathValueTxt" editable="false" prefHeight="27.0"
prefWidth="184.0" text="N/A"/>
<Label fx:id="erroneousValue" text="N/A">
<font>
<Font size="14.0"/>
</font>
</Label>
<Label fx:id="filesizeValue" text="N/A">
<font>
<Font size="14.0"/>
</font>
</Label>
<Label fx:id="validatedValue" layoutX="15.0" layoutY="67.0" text="N/A">
<font>
<Font size="14.0"/>
</font>
</Label>
<Label fx:id="objectCountValue" layoutX="15.0" layoutY="92.0" text="N/A">
<font>
<Font size="14.0"/>
</font>
</Label>
</children>
<padding>
<Insets left="5.0"/>
</padding>
</VBox>
</children>
</HBox>
</content>
</TitledPane>
</children>
</HBox>
<HBox spacing="5.0">
<children>
<StackPane HBox.hgrow="ALWAYS">
<children>
<ProgressBar fx:id="progress" maxWidth="1.7976931348623157E308" minHeight="40.0"
prefHeight="40.0" progress="0.0">
<padding>
<Insets bottom="5.0" right="5.0" top="5.0"/>
</padding>
</ProgressBar>
<ProgressBar fx:id="subProgress" prefHeight="11.0" prefWidth="520.0" progress="0.0"
StackPane.alignment="CENTER_LEFT"/>
</children>
</StackPane>
<Button fx:id="cancelBtn" alignment="CENTER" mnemonicParsing="false" text="Cancel">
<font>
<Font size="14.0"/>
</font>
<HBox.margin>
<Insets top="4.0"/>
</HBox.margin>
</Button>
</children>
<padding>
<Insets left="5.0" right="5.0"/>
</padding>
</HBox>
</children>
</VBox>
...@@ -19,5 +19,8 @@ ...@@ -19,5 +19,8 @@
<Root level="debug" additivity="false"> <Root level="debug" additivity="false">
<AppenderRef ref="console" /> <AppenderRef ref="console" />
</Root> </Root>
<Logger name="com.zaxxer.hikari" level="INFO" additivity="false">
<AppenderRef ref="console"/>
</Logger>
</Loggers> </Loggers>
</Configuration> </Configuration>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>de.hft.stuttgart</groupId> <groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorParent</artifactId> <artifactId>CityDoctorParent</artifactId>
<version>3.17.3</version> <version>3.18.0</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<artifactId>CityDoctorHealer</artifactId> <artifactId>CityDoctorHealer</artifactId>
......
...@@ -24,11 +24,11 @@ public class HealAllPolygonsWrongOrientationErrorTest { ...@@ -24,11 +24,11 @@ public class HealAllPolygonsWrongOrientationErrorTest {
CityDoctorModel model = TestUtil.loadCityModel(path, config); CityDoctorModel model = TestUtil.loadCityModel(path, config);
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Assert.assertTrue(geom.containsError(CheckId.C_GE_S_ALL_POLYGONS_WRONG_ORIENTATION)); Assert.assertTrue(geom.containsError(CheckId.C_GE_S_ALL_POLYGONS_WRONG_ORIENTATION));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_S_ALL_POLYGONS_WRONG_ORIENTATION)); Assert.assertFalse(geom.containsError(CheckId.C_GE_S_ALL_POLYGONS_WRONG_ORIENTATION));
} }
......
...@@ -26,11 +26,11 @@ public class HealConsecutivePointsSameErrorTest { ...@@ -26,11 +26,11 @@ public class HealConsecutivePointsSameErrorTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Assert.assertTrue(geom.containsError(CheckId.C_GE_R_DUPLICATE_POINT)); Assert.assertTrue(geom.containsError(CheckId.C_GE_R_DUPLICATE_POINT));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_R_DUPLICATE_POINT)); Assert.assertFalse(geom.containsError(CheckId.C_GE_R_DUPLICATE_POINT));
} }
......
...@@ -25,11 +25,11 @@ public class HealHoleOutsideErrorTest { ...@@ -25,11 +25,11 @@ public class HealHoleOutsideErrorTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Building building = model.getBuildings().get(0); Building building = model.getBuildings().toList().get(0);
Assert.assertTrue(building.containsError(CheckId.C_GE_P_HOLE_OUTSIDE)); Assert.assertTrue(building.containsError(CheckId.C_GE_P_HOLE_OUTSIDE));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(building.containsError(CheckId.C_GE_P_HOLE_OUTSIDE)); Assert.assertFalse(building.containsError(CheckId.C_GE_P_HOLE_OUTSIDE));
} }
......
...@@ -138,7 +138,7 @@ public class HealMissingSolidTest { ...@@ -138,7 +138,7 @@ public class HealMissingSolidTest {
model.saveAs(createSolidFile.toString(), false); model.saveAs(createSolidFile.toString(), false);
CityDoctorModel parsedModel = CityGmlParser.parseCityGmlFile(createSolidFile.toString(), config.getParserConfiguration()); CityDoctorModel parsedModel = CityGmlParser.parseCityGmlFile(createSolidFile.toString(), config.getParserConfiguration());
Building building = parsedModel.getBuildings().get(0); Building building = parsedModel.getBuildings().toList().get(0);
assertEquals(1, building.getGeometries().size()); assertEquals(1, building.getGeometries().size());
Geometry geometry2 = building.getGeometries().get(0); Geometry geometry2 = building.getGeometries().get(0);
assertEquals(GeometryType.SOLID, geometry2.getType()); assertEquals(GeometryType.SOLID, geometry2.getType());
...@@ -162,7 +162,7 @@ public class HealMissingSolidTest { ...@@ -162,7 +162,7 @@ public class HealMissingSolidTest {
new RequirementConfiguration(false)); new RequirementConfiguration(false));
CityDoctorModel model = CityGmlParser.parseCityGmlFile("src/test/resources/SimpleSolid_SrefBS_withoutSolid.gml", CityDoctorModel model = CityGmlParser.parseCityGmlFile("src/test/resources/SimpleSolid_SrefBS_withoutSolid.gml",
config.getParserConfiguration()); config.getParserConfiguration());
Building b = model.getBuildings().get(0); Building b = model.getBuildings().toList().get(0);
assertTrue(b.getGeometries().isEmpty()); assertTrue(b.getGeometries().isEmpty());
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
......
...@@ -25,11 +25,11 @@ public class HealNonManifoldEdgeErrorTest { ...@@ -25,11 +25,11 @@ public class HealNonManifoldEdgeErrorTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Assert.assertTrue(geom.containsError(CheckId.C_GE_S_NON_MANIFOLD_EDGE)); Assert.assertTrue(geom.containsError(CheckId.C_GE_S_NON_MANIFOLD_EDGE));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_S_NON_MANIFOLD_EDGE)); Assert.assertFalse(geom.containsError(CheckId.C_GE_S_NON_MANIFOLD_EDGE));
} }
......
...@@ -43,12 +43,12 @@ public class HealPlanarPolygonErrorTest { ...@@ -43,12 +43,12 @@ public class HealPlanarPolygonErrorTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Assert.assertTrue(geom.containsError(CheckId.C_GE_P_NON_PLANAR)); Assert.assertTrue(geom.containsError(CheckId.C_GE_P_NON_PLANAR));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.setNumberOfIterations(2); healer.setNumberOfIterations(2);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_P_NON_PLANAR)); Assert.assertFalse(geom.containsError(CheckId.C_GE_P_NON_PLANAR));
......
...@@ -35,11 +35,11 @@ public class HealPolygonWithoutSurfaceTest { ...@@ -35,11 +35,11 @@ public class HealPolygonWithoutSurfaceTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Building building = model.getBuildings().get(0); Building building = model.getBuildings().toList().get(0);
Assert.assertTrue(building.containsError(CheckId.C_SE_POLYGON_WITHOUT_SURFACE)); Assert.assertTrue(building.containsError(CheckId.C_SE_POLYGON_WITHOUT_SURFACE));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(building.containsError(CheckId.C_SE_POLYGON_WITHOUT_SURFACE)); Assert.assertFalse(building.containsError(CheckId.C_SE_POLYGON_WITHOUT_SURFACE));
...@@ -49,7 +49,7 @@ public class HealPolygonWithoutSurfaceTest { ...@@ -49,7 +49,7 @@ public class HealPolygonWithoutSurfaceTest {
CityDoctorModel loadedModel = TestUtil.loadCityModel(outputFile.toString(), config); CityDoctorModel loadedModel = TestUtil.loadCityModel(outputFile.toString(), config);
c = new Checker(config, loadedModel); c = new Checker(config, loadedModel);
c.runChecks(); c.runChecks();
building = loadedModel.getBuildings().get(0); building = loadedModel.getBuildings().toList().get(0);
Assert.assertFalse(building.containsError(CheckId.C_SE_POLYGON_WITHOUT_SURFACE)); Assert.assertFalse(building.containsError(CheckId.C_SE_POLYGON_WITHOUT_SURFACE));
} }
......
...@@ -41,11 +41,11 @@ public class HealPolygonWrongOrientationErrorTest { ...@@ -41,11 +41,11 @@ public class HealPolygonWrongOrientationErrorTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Assert.assertTrue(geom.containsError(CheckId.C_GE_S_POLYGON_WRONG_ORIENTATION)); Assert.assertTrue(geom.containsError(CheckId.C_GE_S_POLYGON_WRONG_ORIENTATION));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_S_POLYGON_WRONG_ORIENTATION)); Assert.assertFalse(geom.containsError(CheckId.C_GE_S_POLYGON_WRONG_ORIENTATION));
} }
......
...@@ -25,11 +25,11 @@ public class HealRingNotClosedErrorTest { ...@@ -25,11 +25,11 @@ public class HealRingNotClosedErrorTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Assert.assertTrue(geom.containsError(CheckId.C_GE_R_NOT_CLOSED)); Assert.assertTrue(geom.containsError(CheckId.C_GE_R_NOT_CLOSED));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_R_NOT_CLOSED)); Assert.assertFalse(geom.containsError(CheckId.C_GE_R_NOT_CLOSED));
} }
......
...@@ -190,11 +190,11 @@ public class HealRingSelfIntErrorTest { ...@@ -190,11 +190,11 @@ public class HealRingSelfIntErrorTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Assert.assertTrue(geom.containsError(CheckId.C_GE_R_SELF_INTERSECTION)); Assert.assertTrue(geom.containsError(CheckId.C_GE_R_SELF_INTERSECTION));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_R_SELF_INTERSECTION)); Assert.assertFalse(geom.containsError(CheckId.C_GE_R_SELF_INTERSECTION));
} }
...@@ -208,11 +208,11 @@ public class HealRingSelfIntErrorTest { ...@@ -208,11 +208,11 @@ public class HealRingSelfIntErrorTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Assert.assertTrue(geom.containsError(CheckId.C_GE_R_SELF_INTERSECTION)); Assert.assertTrue(geom.containsError(CheckId.C_GE_R_SELF_INTERSECTION));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_R_SELF_INTERSECTION)); Assert.assertFalse(geom.containsError(CheckId.C_GE_R_SELF_INTERSECTION));
} }
...@@ -228,11 +228,11 @@ public class HealRingSelfIntErrorTest { ...@@ -228,11 +228,11 @@ public class HealRingSelfIntErrorTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Assert.assertTrue(geom.containsError(CheckId.C_GE_R_SELF_INTERSECTION)); Assert.assertTrue(geom.containsError(CheckId.C_GE_R_SELF_INTERSECTION));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_R_SELF_INTERSECTION)); Assert.assertFalse(geom.containsError(CheckId.C_GE_R_SELF_INTERSECTION));
} }
......
...@@ -26,11 +26,11 @@ public class HealSameOrientationErrorTest { ...@@ -26,11 +26,11 @@ public class HealSameOrientationErrorTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Assert.assertTrue(geom.containsError(CheckId.C_GE_P_ORIENTATION_RINGS_SAME)); Assert.assertTrue(geom.containsError(CheckId.C_GE_P_ORIENTATION_RINGS_SAME));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_P_ORIENTATION_RINGS_SAME)); Assert.assertFalse(geom.containsError(CheckId.C_GE_P_ORIENTATION_RINGS_SAME));
} }
......
...@@ -439,7 +439,7 @@ public class HealSolidNotClosedErrorTest { ...@@ -439,7 +439,7 @@ public class HealSolidNotClosedErrorTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
geom.updateVertices(); geom.updateVertices();
for (Vertex v : geom.getVertices()) { for (Vertex v : geom.getVertices()) {
v.setX(v.getX() - 10); v.setX(v.getX() - 10);
...@@ -449,7 +449,7 @@ public class HealSolidNotClosedErrorTest { ...@@ -449,7 +449,7 @@ public class HealSolidNotClosedErrorTest {
Healer healer = new Healer(c); Healer healer = new Healer(c);
//healer.setNumberOfIterations(2); //healer.setNumberOfIterations(2);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_S_NOT_CLOSED)); Assert.assertFalse(geom.containsError(CheckId.C_GE_S_NOT_CLOSED));
} }
......
...@@ -27,11 +27,11 @@ public class HealTooFewPointsTest { ...@@ -27,11 +27,11 @@ public class HealTooFewPointsTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
assertTrue(geom.containsError(CheckId.C_GE_R_TOO_FEW_POINTS)); assertTrue(geom.containsError(CheckId.C_GE_R_TOO_FEW_POINTS));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
assertFalse(geom.containsError(CheckId.C_GE_R_TOO_FEW_POINTS)); assertFalse(geom.containsError(CheckId.C_GE_R_TOO_FEW_POINTS));
} }
......
...@@ -45,7 +45,7 @@ public class TestHealer { ...@@ -45,7 +45,7 @@ public class TestHealer {
c.runChecks(); c.runChecks();
Building b = null; Building b = null;
for (Building building : model.getBuildings()) { for (Building building : model.getBuildings().toList()) {
if (building.getGmlId().getGmlString().equals("DEBE08YYF0004KZs")) { if (building.getGmlId().getGmlString().equals("DEBE08YYF0004KZs")) {
b = building; b = building;
break; break;
...@@ -125,8 +125,8 @@ public class TestHealer { ...@@ -125,8 +125,8 @@ public class TestHealer {
c.runChecks(); c.runChecks();
Healer healer = new Healer(c); Healer healer = new Healer(c);
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
c.runChecks(); c.runChecks();
assertFalse(geom.containsAnyError()); assertFalse(geom.containsAnyError());
...@@ -151,11 +151,11 @@ public class TestHealer { ...@@ -151,11 +151,11 @@ public class TestHealer {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.setNumberOfIterations(33); healer.setNumberOfIterations(33);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
c.runChecks(); c.runChecks();
assertFalse(geom.containsAnyError()); assertFalse(geom.containsAnyError());
...@@ -171,10 +171,10 @@ public class TestHealer { ...@@ -171,10 +171,10 @@ public class TestHealer {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
c.runChecks(); c.runChecks();
assertFalse(geom.containsAnyError()); assertFalse(geom.containsAnyError());
...@@ -190,11 +190,11 @@ public class TestHealer { ...@@ -190,11 +190,11 @@ public class TestHealer {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.setNumberOfIterations(83); healer.setNumberOfIterations(83);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
c.runChecks(); c.runChecks();
assertFalse(geom.containsAnyError()); assertFalse(geom.containsAnyError());
...@@ -210,11 +210,11 @@ public class TestHealer { ...@@ -210,11 +210,11 @@ public class TestHealer {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.setNumberOfIterations(165); healer.setNumberOfIterations(165);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
c.runChecks(); c.runChecks();
assertFalse(geom.containsAnyError()); assertFalse(geom.containsAnyError());
...@@ -241,7 +241,7 @@ public class TestHealer { ...@@ -241,7 +241,7 @@ public class TestHealer {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Building b = model.getBuildings().get(0); Building b = model.getBuildings().toList().get(0);
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.healCityObject(b); healer.healCityObject(b);
c.runChecks(); c.runChecks();
...@@ -261,11 +261,11 @@ public class TestHealer { ...@@ -261,11 +261,11 @@ public class TestHealer {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.setNumberOfIterations(45); healer.setNumberOfIterations(45);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
c.runChecks(); c.runChecks();
assertFalse(geom.containsAnyError()); assertFalse(geom.containsAnyError());
...@@ -297,10 +297,10 @@ public class TestHealer { ...@@ -297,10 +297,10 @@ public class TestHealer {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Geometry geom = model.getBuildings().get(0).getGeometries().get(0); Geometry geom = model.getBuildings().toList().get(0).getGeometries().get(0);
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.setNumberOfIterations(100); healer.setNumberOfIterations(100);
healer.healCityObject(model.getBuildings().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
c.runChecks(); c.runChecks();
assertFalse(geom.containsAnyError()); assertFalse(geom.containsAnyError());
......
...@@ -38,15 +38,15 @@ public class TestUtil { ...@@ -38,15 +38,15 @@ public class TestUtil {
if (gmlId == null) { if (gmlId == null) {
return null; return null;
} }
Polygon result = getPolygonById(gmlId, model.getBuildings()); Polygon result = getPolygonById(gmlId, model.getBuildings().toList());
if (result != null) { if (result != null) {
return result; return result;
} }
result = getPolygonById(gmlId, model.getVegetation()); result = getPolygonById(gmlId, model.getVegetation().toList());
if (result != null) { if (result != null) {
return result; return result;
} }
return getPolygonById(gmlId, model.getTransportation()); return getPolygonById(gmlId, model.getTransportation().toList());
} }
private static Polygon getPolygonById(String gmlId, List<? extends CityObject> features) { private static Polygon getPolygonById(String gmlId, List<? extends CityObject> features) {
...@@ -85,17 +85,17 @@ public class TestUtil { ...@@ -85,17 +85,17 @@ public class TestUtil {
if (featureId == null) { if (featureId == null) {
return null; return null;
} }
for (CityObject co : model.getBuildings()) { for (CityObject co : model.getBuildings().toList()) {
if (featureId.equals(co.getGmlId().getGmlString())) { if (featureId.equals(co.getGmlId().getGmlString())) {
return co; return co;
} }
} }
for (CityObject co : model.getTransportation()) { for (CityObject co : model.getTransportation().toList()) {
if (featureId.equals(co.getGmlId().getGmlString())) { if (featureId.equals(co.getGmlId().getGmlString())) {
return co; return co;
} }
} }
for (CityObject co : model.getVegetation()) { for (CityObject co : model.getVegetation().toList()) {
if (featureId.equals(co.getGmlId().getGmlString())) { if (featureId.equals(co.getGmlId().getGmlString())) {
return co; return co;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<parent> <parent>
<groupId>de.hft.stuttgart</groupId> <groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorParent</artifactId> <artifactId>CityDoctorParent</artifactId>
<version>3.17.3</version> <version>3.18.0</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<artifactId>CityDoctorHealerGUI</artifactId> <artifactId>CityDoctorHealerGUI</artifactId>
......
Supports Markdown
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