Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
ba4741aa
Commit
ba4741aa
authored
Jul 16, 2021
by
Matthias Betz
Browse files
Added healing method id
parent
a56e7b9f
Pipeline
#4553
passed with stage
in 2 minutes and 42 seconds
Changes
14
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/
test
/java/de/hft/stuttgart/citydoctor2/
test/util
/AbstractCheck.java
→
CityDoctorParent/CityDoctorModel/src/
main
/java/de/hft/stuttgart/citydoctor2/
check
/AbstractCheck.java
View file @
ba4741aa
...
...
@@ -16,20 +16,23 @@
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package
de.hft.stuttgart.citydoctor2.
test.util
;
package
de.hft.stuttgart.citydoctor2.
check
;
import
java.util.Collections
;
import
java.util.Set
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.Requirement
;
import
de.hft.stuttgart.citydoctor2.check.RequirementType
;
/**
* This is an empty implementation for a check. Can be used as a normal visitor
* for the city doctor data model
*
* @author Matthias Betz
*
*/
public
class
AbstractCheck
extends
Check
{
@Override
public
Set
<
Requirement
>
appliesToRequirements
()
{
return
null
;
return
Collections
.
emptySet
()
;
}
@Override
...
...
@@ -46,6 +49,5 @@ public class AbstractCheck extends Check {
public
Check
createNewInstance
()
{
return
null
;
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/HealingID.java
0 → 100644
View file @
ba4741aa
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package
de.hft.stuttgart.citydoctor2.check
;
public
class
HealingID
{
public
static
final
HealingID
S_GEOMETRIC_SIMPLIFIER
=
new
HealingID
(
"S_GEOMETRIC_SIMPLIFIER"
);
public
static
final
HealingID
S_ALL_POLYGONS_WRONG_ORIENTATION
=
new
HealingID
(
"S_ALL_POLYGONS_WRONG_ORIENTATION"
);
public
static
final
HealingID
S_NON_MANIFOLD_EDGE
=
new
HealingID
(
"S_NON_MANIFOLD_EDGE"
);
public
static
final
HealingID
S_POLYGON_WRONG_ORIENTATION
=
new
HealingID
(
"S_POLYGON_WRONG_ORIENTATION"
);
public
static
final
HealingID
S_WRONG_DORMERS
=
new
HealingID
(
"S_WRONG_DORMERS"
);
public
static
final
HealingID
R_CONSECUTIVE_POINTS_SAME
=
new
HealingID
(
"R_CONSECUTIVE_POINTS_SAME"
);
public
static
final
HealingID
P_HOLE_OUTSIDE
=
new
HealingID
(
"P_HOLE_OUTSIDE"
);
public
static
final
HealingID
SE_MISSING_LOD2_SOLID
=
new
HealingID
(
"SE_MISSING_LOD2_SOLID"
);
public
static
final
HealingID
P_NON_PLANAR_POLYGON
=
new
HealingID
(
"P_NON_PLANAR_POLYGON"
);
public
static
final
HealingID
R_NOT_CLOSED
=
new
HealingID
(
"R_NOT_CLOSED"
);
public
static
final
HealingID
R_SELF_INTERSECTION
=
new
HealingID
(
"R_SELF_INTERSECTION"
);
public
static
final
HealingID
P_SAME_ORIENTATION
=
new
HealingID
(
"P_SAME_ORIENTATION"
);
public
static
final
HealingID
R_TOO_FEW_POINTS
=
new
HealingID
(
"R_TOO_FEW_POINTS"
);
public
static
final
HealingID
S_NOT_CLOSED
=
new
HealingID
(
"S_NOT_CLOSED"
);
private
String
idString
;
public
HealingID
(
String
idString
)
{
this
.
idString
=
idString
;
}
@Override
public
String
toString
()
{
return
"HealingID [idString="
+
idString
+
"]"
;
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
idString
==
null
)
?
0
:
idString
.
hashCode
());
return
result
;
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
return
true
;
if
(
obj
==
null
)
return
false
;
if
(
getClass
()
!=
obj
.
getClass
())
return
false
;
HealingID
other
=
(
HealingID
)
obj
;
if
(
idString
==
null
)
{
if
(
other
.
idString
!=
null
)
return
false
;
}
else
if
(!
idString
.
equals
(
other
.
idString
))
return
false
;
return
true
;
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/HealingMethod.java
View file @
ba4741aa
...
...
@@ -21,6 +21,7 @@ package de.hft.stuttgart.citydoctor2.check;
import
de.hft.stuttgart.citydoctor2.check.error.AllPolygonsWrongOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.AttributeMissingError
;
import
de.hft.stuttgart.citydoctor2.check.error.ConsecutivePointSameError
;
import
de.hft.stuttgart.citydoctor2.check.error.DegeneratedRingError
;
import
de.hft.stuttgart.citydoctor2.check.error.DependenciesNotMetError
;
import
de.hft.stuttgart.citydoctor2.check.error.MultipleConnectedComponentsError
;
import
de.hft.stuttgart.citydoctor2.check.error.NestedRingError
;
...
...
@@ -47,7 +48,6 @@ import de.hft.stuttgart.citydoctor2.check.error.SchematronError;
import
de.hft.stuttgart.citydoctor2.check.error.SolidNotClosedError
;
import
de.hft.stuttgart.citydoctor2.check.error.SolidSelfIntError
;
import
de.hft.stuttgart.citydoctor2.check.error.SurfaceUnfragmentedError
;
import
de.hft.stuttgart.citydoctor2.check.error.DegeneratedRingError
;
import
de.hft.stuttgart.citydoctor2.check.error.TooFewPolygonsError
;
import
de.hft.stuttgart.citydoctor2.check.error.UnknownCheckError
;
...
...
@@ -60,6 +60,9 @@ import de.hft.stuttgart.citydoctor2.check.error.UnknownCheckError;
*
*/
public
interface
HealingMethod
{
public
HealingID
getID
();
default
boolean
visit
(
CheckError
e
,
ModificationListener
l
)
{
return
false
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/math/CovarianceMatrix.java
View file @
ba4741aa
...
...
@@ -33,7 +33,6 @@ public class CovarianceMatrix {
}
/**
* see {@link CovarianceMatrix#calculateCovarianceMatrix(List, double[])}
*
* @param vertices the vertices for which the matrix is calculated
* @param expected the expected values as a vector
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractBuildingTest.java
View file @
ba4741aa
...
...
@@ -45,12 +45,12 @@ import org.citygml4j.model.gml.geometry.primitives.SurfaceProperty;
import
org.junit.Test
;
import
org.mockito.Mockito
;
import
de.hft.stuttgart.citydoctor2.check.AbstractCheck
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckResult
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.test.util.AbstractCheck
;
public
class
AbstractBuildingTest
{
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/BoundarySurfaceTest.java
View file @
ba4741aa
...
...
@@ -35,12 +35,12 @@ import org.citygml4j.model.gml.geometry.aggregates.MultiSurfaceProperty;
import
org.junit.Test
;
import
org.mockito.Mockito
;
import
de.hft.stuttgart.citydoctor2.check.AbstractCheck
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckResult
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.test.util.AbstractCheck
;
public
class
BoundarySurfaceTest
{
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeObjectTest.java
View file @
ba4741aa
...
...
@@ -18,7 +18,10 @@
*/
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
static
org
.
junit
.
Assert
.*;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
verify
;
import
static
org
.
mockito
.
Mockito
.
when
;
...
...
@@ -31,13 +34,13 @@ import org.citygml4j.model.citygml.bridge.AbstractBridge;
import
org.citygml4j.model.citygml.bridge.Bridge
;
import
org.junit.Test
;
import
de.hft.stuttgart.citydoctor2.check.AbstractCheck
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckResult
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.datastructure.BridgeObject.BridgeType
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.test.util.AbstractCheck
;
public
class
BridgeObjectTest
{
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/geometry/DuplicatePointsCheck.java
View file @
ba4741aa
...
...
@@ -96,6 +96,7 @@ public class DuplicatePointsCheck extends Check {
Vertex
point2
=
pointList
.
get
(
i
+
1
);
if
(
point1
.
equalsWithEpsilon
(
point2
,
epsilon
))
{
// consecutive points same
System
.
out
.
println
(
point1
.
getDistance
(
point2
));
CheckError
err
=
new
ConsecutivePointSameError
(
lr
,
point1
,
point2
);
CheckResult
cr
=
new
CheckResult
(
this
,
ResultStatus
.
ERROR
,
err
);
lr
.
addCheckResult
(
cr
);
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/util/SelfIntersectionUtil.java
View file @
ba4741aa
...
...
@@ -21,6 +21,7 @@ package de.hft.stuttgart.citydoctor2.checks.util;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.StringJoiner
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -46,6 +47,8 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import
de.hft.stuttgart.citydoctor2.datastructure.Vertex
;
import
de.hft.stuttgart.citydoctor2.edge.MeshSurface
;
import
de.hft.stuttgart.citydoctor2.edge.MeshSurfaceUtils
;
import
de.hft.stuttgart.citydoctor2.edge.PolyLine
;
import
de.hft.stuttgart.citydoctor2.edge.PolyLineSegment
;
import
de.hft.stuttgart.citydoctor2.edge.PolygonPolygonIntersection
;
import
de.hft.stuttgart.citydoctor2.math.MovedPolygon
;
import
de.hft.stuttgart.citydoctor2.math.MovedRing
;
...
...
@@ -105,7 +108,44 @@ public class SelfIntersectionUtil {
for
(
Vertex
v
:
p2
.
getExteriorRing
().
getVertices
())
{
System
.
out
.
println
(
v
);
}
// DebugUtils.printPolygon3d(polygonPolygonIntersection.getPolygon1());
de
.
hft
.
stuttgart
.
citydoctor2
.
edge
.
IntersectionType
intersectionType
=
polygonPolygonIntersection
.
getIntersectionType
();
System
.
out
.
println
(
intersectionType
);
PolyLine
polyLine
=
polygonPolygonIntersection
.
getPolyLine
();
PolyLineSegment
firstSegment
=
polyLine
.
getFirstSegment
();
PolyLineSegment
next
=
firstSegment
.
getNext
();
System
.
out
.
println
(
firstSegment
.
getStart
());
while
(
firstSegment
!=
next
&&
next
!=
null
)
{
System
.
out
.
println
(
next
.
getStart
());
next
=
next
.
getNext
();
}
Vertex
movedBy
=
p1
.
getExteriorRing
().
getVertices
().
get
(
0
);
MovedPolygon
movedPolygon
=
MovedPolygon
.
ofPolygon
(
p1
,
movedBy
);
MovedPolygon
movedPolygon2
=
MovedPolygon
.
ofPolygon
(
p2
,
p1
.
getExteriorRing
().
getVertices
().
get
(
0
));
StringJoiner
sj
=
new
StringJoiner
(
" "
,
"polygon("
,
")"
);
for
(
Vector3d
v
:
movedPolygon
.
getExteriorRing
().
getVertices
())
{
StringJoiner
sj2
=
new
StringJoiner
(
"|"
);
sj2
.
add
(
""
+
v
.
getX
());
sj2
.
add
(
""
+
v
.
getY
());
sj2
.
add
(
""
+
v
.
getZ
());
sj
.
add
(
sj2
.
toString
());
}
System
.
out
.
println
(
sj
);
sj
=
new
StringJoiner
(
" "
,
"polygon("
,
")"
);
for
(
Vector3d
v
:
movedPolygon2
.
getExteriorRing
().
getVertices
())
{
StringJoiner
sj2
=
new
StringJoiner
(
"|"
);
sj2
.
add
(
""
+
v
.
getX
());
sj2
.
add
(
""
+
v
.
getY
());
sj2
.
add
(
""
+
v
.
getZ
());
sj
.
add
(
sj2
.
toString
());
}
System
.
out
.
println
(
sj
);
// DebugUtils.printPolygon3d(polygonPolygonIntersection.getPolygon1());
// System.out.println();
// DebugUtils.printPolygon3d(polygonPolygonIntersection.getPolygon2());
intersections
.
add
(
PolygonIntersection
.
lines
(
Collections
.
emptyList
(),
p1
,
p2
));
...
...
CityDoctorParent/non-maven-libs/org/locationtech/proj4j/proj4j/1.1.2/proj4j-1.1.2-javadoc.jar
deleted
100644 → 0
View file @
a56e7b9f
File deleted
CityDoctorParent/non-maven-libs/org/locationtech/proj4j/proj4j/1.1.2/proj4j-1.1.2-sources.jar
deleted
100644 → 0
View file @
a56e7b9f
File deleted
CityDoctorParent/non-maven-libs/org/locationtech/proj4j/proj4j/1.1.2/proj4j-1.1.2.jar
deleted
100644 → 0
View file @
a56e7b9f
File deleted
CityDoctorParent/non-maven-libs/org/locationtech/proj4j/proj4j/1.1.2/proj4j-1.1.2.pom
deleted
100644 → 0
View file @
a56e7b9f
<?xml version="1.0"?>
<project
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.locationtech.proj4j
</groupId>
<artifactId>
proj4j
</artifactId>
<version>
1.1.2
</version>
<packaging>
bundle
</packaging>
<name>
Proj4J
</name>
<description>
Java port of the Proj.4 library for coordinate reprojection
</description>
<url>
https://github.com/locationtech/proj4j
</url>
<licenses>
<license>
<name>
Apache License, Version 2.0
</name>
<url>
http://www.apache.org/licenses/LICENSE-2.0
</url>
</license>
</licenses>
<developers>
<developer>
<id>
echeipesh
</id>
<name>
Eugene Cheipesh
</name>
<url>
http://github.com/echeipesh/
</url>
</developer>
<developer>
<id>
lossyrob
</id>
<name>
Rob Emanuele
</name>
<url>
http://github.com/lossyrob/
</url>
</developer>
</developers>
<contributors>
<contributor>
<name>
Martin Davis
</name>
<url>
https://github.com/dr-jts
</url>
</contributor>
</contributors>
<scm>
<connection>
scm:git:https://github.com/locationtech/proj4j.git
</connection>
<tag>
1.1.2
</tag>
<url>
https://github.com/locationtech/proj4j.git
</url>
</scm>
<properties>
<osgi-version-qualifier>
${maven.build.timestamp}
</osgi-version-qualifier>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<maven.build.timestamp.format>
yyyyMMddHHmm
</maven.build.timestamp.format>
<bundle-symbolicname>
org.locationtech.proj4j
</bundle-symbolicname>
</properties>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.13.1
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.6.0
</version>
<configuration>
<source>
1.8
</source>
<target>
1.8
</target>
<debug>
true
</debug>
<encoding>
UTF-8
</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-javadoc-plugin
</artifactId>
<version>
3.0.1
</version>
<executions>
<execution>
<id>
attach-javadocs
</id>
<goals>
<goal>
jar
</goal>
</goals>
<configuration>
<failOnError>
true
</failOnError>
<failOnWarnings>
false
</failOnWarnings>
</configuration>
</execution>
</executions>
<inherited>
true
</inherited>
</plugin>
<plugin>
<artifactId>
maven-source-plugin
</artifactId>
<version>
3.0.1
</version>
<executions>
<execution>
<id>
attach-sources
</id>
<goals>
<goal>
jar
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
2.19.1
</version>
</plugin>
<plugin>
<groupId>
org.apache.felix
</groupId>
<artifactId>
maven-bundle-plugin
</artifactId>
<version>
4.2.0
</version>
<extensions>
true
</extensions>
<configuration>
<instructions>
<_nouses>
true
</_nouses>
<_snapshot>
${osgi-version-qualifier}
</_snapshot>
<Bundle-SymbolicName>
${bundle-symbolicname}
</Bundle-SymbolicName>
<Import-Package
/>
</instructions>
<niceManifest>
true
</niceManifest>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-deploy-plugin
</artifactId>
<version>
2.8.2
</version>
<executions>
<execution>
<id>
default-deploy
</id>
<phase>
deploy
</phase>
<goals>
<goal>
deploy
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>
eclipse
</id>
<distributionManagement>
<repository>
<id>
repo.eclipse.org
</id>
<name>
Proj4J Repository - Releases
</name>
<url>
https://repo.eclipse.org/content/repositories/proj4j-releases/
</url>
</repository>
<snapshotRepository>
<id>
repo.eclipse.org
</id>
<name>
Proj4J Repository - Snapshots
</name>
<url>
https://repo.eclipse.org/content/repositories/proj4j-snapshots/
</url>
</snapshotRepository>
</distributionManagement>
</profile>
<profile>
<id>
central
</id>
<build>
<plugins>
<plugin>
<groupId>
org.sonatype.plugins
</groupId>
<artifactId>
nexus-staging-maven-plugin
</artifactId>
<version>
1.6.7
</version>
<extensions>
true
</extensions>
<configuration>
<serverId>
ossrh
</serverId>
<nexusUrl>
https://oss.sonatype.org/
</nexusUrl>
<autoReleaseAfterClose>
false
</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-gpg-plugin
</artifactId>
<version>
1.6
</version>
<executions>
<execution>
<id>
sign-artifacts
</id>
<phase>
verify
</phase>
<goals>
<goal>
sign
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>
ossrh
</id>
<url>
https://oss.sonatype.org/service/local/staging/deploy/maven2/
</url>
</repository>
<snapshotRepository>
<id>
ossrh
</id>
<url>
https://oss.sonatype.org/content/repositories/snapshots
</url>
</snapshotRepository>
</distributionManagement>
</profile>
</profiles>
</project>
CityDoctorParent/non-maven-libs/org/locationtech/proj4j/proj4j/maven-metadata-local.xml
deleted
100644 → 0
View file @
a56e7b9f
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>
org.locationtech.proj4j
</groupId>
<artifactId>
proj4j
</artifactId>
<versioning>
<release>
1.1.2
</release>
<versions>
<version>
1.1.2
</version>
</versions>
<lastUpdated>
20210510083458
</lastUpdated>
</versioning>
</metadata>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment