Commit 0d2e9fd5 authored by Riegel's avatar Riegel
Browse files

Merge branch 'dev' into 'master'

Version 3.17.2

See merge request !32
parents 491a5dfd e0e40fdd
Pipeline #11127 canceled with stage
package de.hft.stuttgart.citydoctor2.gui.tree; package de.hft.stuttgart.citydoctor2.gui.tree.node;
import de.hft.stuttgart.citydoctor2.datastructure.Opening; import de.hft.stuttgart.citydoctor2.datastructure.Opening;
import de.hft.stuttgart.citydoctor2.gui.CheckStatus; import de.hft.stuttgart.citydoctor2.gui.CheckStatus;
import de.hft.stuttgart.citydoctor2.gui.Renderer; import de.hft.stuttgart.citydoctor2.gui.Renderer;
import de.hft.stuttgart.citydoctor2.gui.tree.Renderable;
public class OpeningNode extends Renderable { public class OpeningNode extends Renderable {
......
package de.hft.stuttgart.citydoctor2.gui.tree; package de.hft.stuttgart.citydoctor2.gui.tree.node;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon; import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.gui.CheckStatus; import de.hft.stuttgart.citydoctor2.gui.CheckStatus;
import de.hft.stuttgart.citydoctor2.gui.Renderer; import de.hft.stuttgart.citydoctor2.gui.Renderer;
import de.hft.stuttgart.citydoctor2.gui.tree.Renderable;
public class PolygonNode extends Renderable { public class PolygonNode extends Renderable {
......
package de.hft.stuttgart.citydoctor2.gui.tree; package de.hft.stuttgart.citydoctor2.gui.tree.node;
import de.hft.stuttgart.citydoctor2.gui.Renderer; import de.hft.stuttgart.citydoctor2.gui.Renderer;
import de.hft.stuttgart.citydoctor2.gui.tree.Renderable;
public class TextNode extends Renderable { public class TextNode extends Renderable {
......
package de.hft.stuttgart.citydoctor2.gui.tree.node;
import de.hft.stuttgart.citydoctor2.datastructure.CityObject;
import de.hft.stuttgart.citydoctor2.gui.MainWindow;
import de.hft.stuttgart.citydoctor2.utils.Localization;
import javafx.scene.input.Clipboard;
import javafx.scene.input.ClipboardContent;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import static javafx.scene.input.Clipboard.getSystemClipboard;
public class TopLevelCityObjectNode extends CityObjectNode {
private static final Logger logger = LogManager.getLogger(TopLevelCityObjectNode.class);
public TopLevelCityObjectNode(CityObject co) {
super(co);
}
@Override
public void getClipboardAction(MainWindow mainWindow) {
Clipboard clipboard = getSystemClipboard();
ClipboardContent content = new ClipboardContent();
content.putString(this.getFeature().getGmlId().toString());
if (!clipboard.setContent(content)) {
if (logger.isWarnEnabled()) {
logger.warn(Localization.getText("MainWindow.warnCopyIdFailed"));
}
}
}
@Override
public void getFeatureExportAction(MainWindow mainWindow) {
try {
mainWindow.getController().export(this.getFeature());
if (logger.isWarnEnabled()) {
logger.info(Localization.getText("CityDoctorController.exportSuccess"));
}
} catch (Exception e) {
logger.error("Export failed: Unexpected error occurred");
logger.error(e);
}
}
}
package de.hft.stuttgart.citydoctor2.gui.tree; package de.hft.stuttgart.citydoctor2.gui.tree.node;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols; import java.text.DecimalFormatSymbols;
import de.hft.stuttgart.citydoctor2.datastructure.Vertex; import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
import de.hft.stuttgart.citydoctor2.gui.Renderer; import de.hft.stuttgart.citydoctor2.gui.Renderer;
import de.hft.stuttgart.citydoctor2.gui.tree.Renderable;
public class VertexNode extends Renderable { public class VertexNode extends Renderable {
......
package de.hft.stuttgart.citydoctor2.gui.tree; package de.hft.stuttgart.citydoctor2.gui.tree.node;
import de.hft.stuttgart.citydoctor2.zip.CityGmlZipEntry; import de.hft.stuttgart.citydoctor2.zip.CityGmlZipEntry;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
......
...@@ -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.1</version> <version>3.17.2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<artifactId>CityDoctorHealer</artifactId> <artifactId>CityDoctorHealer</artifactId>
......
...@@ -263,7 +263,7 @@ public class Healer { ...@@ -263,7 +263,7 @@ public class Healer {
co.reCreateGeometries(factory, checker.getConfig().getParserConfiguration()); co.reCreateGeometries(factory, checker.getConfig().getParserConfiguration());
byte[] gml = writeCityGml(co.getGmlObject()); byte[] gml = writeCityGml(co.getGmlObject());
// remove them again to save memory // remove them again to save memory
co.unsetGmlGeometries(); co.clearGmlGeometries();
SvrlContentHandler handler = Checker.executeSchematronValidationIfAvailable(config, SvrlContentHandler handler = Checker.executeSchematronValidationIfAvailable(config,
new ByteArrayInputStream(gml)); new ByteArrayInputStream(gml));
if (handler != null) { if (handler != null) {
......
...@@ -2,6 +2,8 @@ package de.hft.stuttgart.citydoctor2.healing; ...@@ -2,6 +2,8 @@ package de.hft.stuttgart.citydoctor2.healing;
import java.io.IOException; import java.io.IOException;
import de.hft.stuttgart.citydoctor2.datastructure.BoundarySurface;
import de.hft.stuttgart.citydoctor2.datastructure.Building;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
...@@ -24,14 +26,14 @@ public class HealHoleOutsideErrorTest { ...@@ -24,14 +26,14 @@ public class HealHoleOutsideErrorTest {
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); Building building = model.getBuildings().get(0);
Assert.assertTrue(geom.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().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_P_HOLE_OUTSIDE)); Assert.assertFalse(building.containsError(CheckId.C_GE_P_HOLE_OUTSIDE));
} }
} }
...@@ -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.1</version> <version>3.17.2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<artifactId>CityDoctorHealerGUI</artifactId> <artifactId>CityDoctorHealerGUI</artifactId>
...@@ -26,14 +26,14 @@ ...@@ -26,14 +26,14 @@
<groupId>de.hft.stuttgart</groupId> <groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorAutoPro</artifactId> <artifactId>CityDoctorAutoPro</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.openjfx</groupId> <groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId> <artifactId>javafx-controls</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.openjfx</groupId> <groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId> <artifactId>javafx-fxml</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>de.hft.stuttgart</groupId> <groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorParent</artifactId> <artifactId>CityDoctorParent</artifactId>
<version>3.17.1</version> <version>3.17.2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<artifactId>CityDoctorHealerGenetic</artifactId> <artifactId>CityDoctorHealerGenetic</artifactId>
......
...@@ -66,9 +66,9 @@ public class NonPlanarGenetic { ...@@ -66,9 +66,9 @@ public class NonPlanarGenetic {
private static final int ERROR_PENALTY = 100000; private static final int ERROR_PENALTY = 100000;
private Random r = new Random(); private Random r = new Random();
private Map<Integer, List<Long>> durationMap = new HashMap<>(); private Map<Integer, List<Long>> durationMap = new HashMap<>();
@Test //@Test
public void findVerticesForNonPlanarTest() throws CityGmlParseException, InvalidGmlFileException, IOException { public void findVerticesForNonPlanarTest() throws CityGmlParseException, InvalidGmlFileException, IOException {
ValidationConfiguration config = ValidationConfiguration.loadStandardValidationConfig(); ValidationConfiguration config = ValidationConfiguration.loadStandardValidationConfig();
config.setNumberOfRoundingPlacesInGlobalParameters(8); config.setNumberOfRoundingPlacesInGlobalParameters(8);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>de.hft.stuttgart</groupId> <groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorParent</artifactId> <artifactId>CityDoctorParent</artifactId>
<version>3.17.1</version> <version>3.17.2</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>CityDoctorParent</name> <name>CityDoctorParent</name>
<properties> <properties>
...@@ -115,6 +115,12 @@ ...@@ -115,6 +115,12 @@
<artifactId>CityDoctorHealer</artifactId> <artifactId>CityDoctorHealer</artifactId>
<version>${revision}</version> <version>${revision}</version>
</dependency> </dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.1</version>
<scope>compile</scope>
</dependency>
<dependency> <dependency>
<groupId>net.sf.saxon</groupId> <groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId> <artifactId>Saxon-HE</artifactId>
...@@ -143,7 +149,7 @@ ...@@ -143,7 +149,7 @@
<dependency> <dependency>
<groupId>org.apache.xmlgraphics</groupId> <groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId> <artifactId>fop</artifactId>
<version>2.7</version> <version>2.10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jdom</groupId> <groupId>org.jdom</groupId>
...@@ -248,22 +254,18 @@ ...@@ -248,22 +254,18 @@
<dependency> <dependency>
<groupId>org.openjfx</groupId> <groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId> <artifactId>javafx-controls</artifactId>
<version>${jfx-version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.openjfx</groupId> <groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId> <artifactId>javafx-fxml</artifactId>
<version>${jfx-version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.openjfx</groupId> <groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId> <artifactId>javafx-swing</artifactId>
<version>${jfx-version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>info.picocli</groupId> <groupId>info.picocli</groupId>
<artifactId>picocli</artifactId> <artifactId>picocli</artifactId>
<version>4.7.6</version>
</dependency> </dependency>
</dependencies> </dependencies>
<modules> <modules>
......
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