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
a707fb93
Commit
a707fb93
authored
Nov 12, 2020
by
Matthias Betz
Browse files
Renaming error classes
parent
e6b83505
Pipeline
#1255
passed with stage
in 1 minute and 49 seconds
Changes
20
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/ErrorVisitor.java
View file @
a707fb93
...
...
@@ -21,33 +21,32 @@ package de.hft.stuttgart.citydoctor2.check;
import
de.hft.stuttgart.citydoctor2.check.error.AllPolygonsWrongOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.ConsecutivePointSameError
;
import
de.hft.stuttgart.citydoctor2.check.error.DependenciesNotMetError
;
import
de.hft.stuttgart.citydoctor2.check.error.NonPlanarPolygonDistancePlaneError
;
import
de.hft.stuttgart.citydoctor2.check.error.DuplicatePointError
;
import
de.hft.stuttgart.citydoctor2.check.error.EdgeIntersectionError
;
import
de.hft.stuttgart.citydoctor2.check.error.HoleOutsideError
;
import
de.hft.stuttgart.citydoctor2.check.error.InteriorDisconnectedError
;
import
de.hft.stuttgart.citydoctor2.check.error.ManifoldEdgeError
;
import
de.hft.stuttgart.citydoctor2.check.error.MultipleConnectedComponentsError
;
import
de.hft.stuttgart.citydoctor2.check.error.NestedRingError
;
import
de.hft.stuttgart.citydoctor2.check.error.NonManifoldEdgeError
;
import
de.hft.stuttgart.citydoctor2.check.error.NonManifoldVertexError
;
import
de.hft.stuttgart.citydoctor2.check.error.NormalDeviationError
;
import
de.hft.stuttgart.citydoctor2.check.error.NonPlanarPolygonDistancePlaneError
;
import
de.hft.stuttgart.citydoctor2.check.error.NonPlanarPolygonNormalsDeviation
;
import
de.hft.stuttgart.citydoctor2.check.error.NotCeilingError
;
import
de.hft.stuttgart.citydoctor2.check.error.NotFloorError
;
import
de.hft.stuttgart.citydoctor2.check.error.NotGroundError
;
import
de.hft.stuttgart.citydoctor2.check.error.NotWallError
;
import
de.hft.stuttgart.citydoctor2.check.error.NullAreaError
;
import
de.hft.stuttgart.citydoctor2.check.error.PointTouchesEdgeError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonHoleOutsideError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonInteriorDisconnectedError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonIntersectingRingsError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonSameOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonWrongOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingDuplicatePointError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingEdgeIntersectionError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingNotClosedError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingSelfIntError
;
import
de.hft.stuttgart.citydoctor2.check.error.SameOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingTooFewPointsError
;
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.TinyEdgeError
;
import
de.hft.stuttgart.citydoctor2.check.error.TooFewPointsError
;
import
de.hft.stuttgart.citydoctor2.check.error.TooFewPolygonsError
;
import
de.hft.stuttgart.citydoctor2.check.error.UnknownCheckError
;
...
...
@@ -60,9 +59,9 @@ import de.hft.stuttgart.citydoctor2.check.error.UnknownCheckError;
*/
public
interface
ErrorVisitor
{
public
void
visit
(
HoleOutsideError
err
);
public
void
visit
(
Polygon
HoleOutsideError
err
);
public
void
visit
(
ManifoldEdgeError
err
);
public
void
visit
(
Non
ManifoldEdgeError
err
);
public
void
visit
(
MultipleConnectedComponentsError
err
);
...
...
@@ -72,7 +71,7 @@ public interface ErrorVisitor {
public
void
visit
(
PolygonWrongOrientationError
err
);
public
void
visit
(
SameOrientationError
err
);
public
void
visit
(
Polygon
SameOrientationError
err
);
public
void
visit
(
SolidNotClosedError
err
);
...
...
@@ -84,17 +83,15 @@ public interface ErrorVisitor {
public
void
visit
(
ConsecutivePointSameError
err
);
public
void
visit
(
RingSelfIntError
err
);
public
void
visit
(
AllPolygonsWrongOrientationError
err
);
public
void
visit
(
InteriorDisconnectedError
err
);
public
void
visit
(
Polygon
InteriorDisconnectedError
err
);
public
void
visit
(
NullAreaError
err
);
public
void
visit
(
TooFewPointsError
err
);
public
void
visit
(
Ring
TooFewPointsError
err
);
public
void
visit
(
NormalDeviation
Error
err
);
public
void
visit
(
NonPlanarPolygon
Normal
s
Deviation
err
);
public
void
visit
(
NonPlanarPolygonDistancePlaneError
err
);
...
...
@@ -104,9 +101,9 @@ public interface ErrorVisitor {
public
void
visit
(
TooFewPolygonsError
err
);
public
void
visit
(
DuplicatePointError
err
);
public
void
visit
(
Ring
DuplicatePointError
err
);
public
void
visit
(
EdgeIntersectionError
err
);
public
void
visit
(
Ring
EdgeIntersectionError
err
);
public
void
visit
(
PointTouchesEdgeError
err
);
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/HealingMethod.java
View file @
a707fb93
...
...
@@ -21,33 +21,32 @@ package de.hft.stuttgart.citydoctor2.check;
import
de.hft.stuttgart.citydoctor2.check.error.AllPolygonsWrongOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.ConsecutivePointSameError
;
import
de.hft.stuttgart.citydoctor2.check.error.DependenciesNotMetError
;
import
de.hft.stuttgart.citydoctor2.check.error.NonPlanarPolygonDistancePlaneError
;
import
de.hft.stuttgart.citydoctor2.check.error.DuplicatePointError
;
import
de.hft.stuttgart.citydoctor2.check.error.EdgeIntersectionError
;
import
de.hft.stuttgart.citydoctor2.check.error.HoleOutsideError
;
import
de.hft.stuttgart.citydoctor2.check.error.InteriorDisconnectedError
;
import
de.hft.stuttgart.citydoctor2.check.error.ManifoldEdgeError
;
import
de.hft.stuttgart.citydoctor2.check.error.MultipleConnectedComponentsError
;
import
de.hft.stuttgart.citydoctor2.check.error.NestedRingError
;
import
de.hft.stuttgart.citydoctor2.check.error.NonManifoldEdgeError
;
import
de.hft.stuttgart.citydoctor2.check.error.NonManifoldVertexError
;
import
de.hft.stuttgart.citydoctor2.check.error.NormalDeviationError
;
import
de.hft.stuttgart.citydoctor2.check.error.NonPlanarPolygonDistancePlaneError
;
import
de.hft.stuttgart.citydoctor2.check.error.NonPlanarPolygonNormalsDeviation
;
import
de.hft.stuttgart.citydoctor2.check.error.NotCeilingError
;
import
de.hft.stuttgart.citydoctor2.check.error.NotFloorError
;
import
de.hft.stuttgart.citydoctor2.check.error.NotGroundError
;
import
de.hft.stuttgart.citydoctor2.check.error.NotWallError
;
import
de.hft.stuttgart.citydoctor2.check.error.NullAreaError
;
import
de.hft.stuttgart.citydoctor2.check.error.PointTouchesEdgeError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonHoleOutsideError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonInteriorDisconnectedError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonIntersectingRingsError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonSameOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonWrongOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingDuplicatePointError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingEdgeIntersectionError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingNotClosedError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingSelfIntError
;
import
de.hft.stuttgart.citydoctor2.check.error.SameOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingTooFewPointsError
;
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.TinyEdgeError
;
import
de.hft.stuttgart.citydoctor2.check.error.TooFewPointsError
;
import
de.hft.stuttgart.citydoctor2.check.error.TooFewPolygonsError
;
import
de.hft.stuttgart.citydoctor2.check.error.UnknownCheckError
;
...
...
@@ -69,11 +68,11 @@ public interface HealingMethod {
return
false
;
}
default
boolean
visit
(
EdgeIntersectionError
edgeIntersectionError
,
ModificationListener
l
)
{
default
boolean
visit
(
Ring
EdgeIntersectionError
edgeIntersectionError
,
ModificationListener
l
)
{
return
false
;
}
default
boolean
visit
(
DuplicatePointError
duplicatePointError
,
ModificationListener
l
)
{
default
boolean
visit
(
Ring
DuplicatePointError
duplicatePointError
,
ModificationListener
l
)
{
return
false
;
}
...
...
@@ -93,15 +92,15 @@ public interface HealingMethod {
return
false
;
}
default
boolean
visit
(
HoleOutsideError
err
,
ModificationListener
l
)
{
default
boolean
visit
(
Polygon
HoleOutsideError
err
,
ModificationListener
l
)
{
return
false
;
}
default
boolean
visit
(
InteriorDisconnectedError
err
,
ModificationListener
l
)
{
default
boolean
visit
(
Polygon
InteriorDisconnectedError
err
,
ModificationListener
l
)
{
return
false
;
}
default
boolean
visit
(
ManifoldEdgeError
err
,
ModificationListener
l
)
{
default
boolean
visit
(
Non
ManifoldEdgeError
err
,
ModificationListener
l
)
{
return
false
;
}
...
...
@@ -117,7 +116,7 @@ public interface HealingMethod {
return
false
;
}
default
boolean
visit
(
NormalDeviation
Error
err
,
ModificationListener
l
)
{
default
boolean
visit
(
NonPlanarPolygon
Normal
s
Deviation
err
,
ModificationListener
l
)
{
return
false
;
}
...
...
@@ -137,11 +136,7 @@ public interface HealingMethod {
return
false
;
}
default
boolean
visit
(
RingSelfIntError
err
,
ModificationListener
l
)
{
return
false
;
}
default
boolean
visit
(
SameOrientationError
err
,
ModificationListener
l
)
{
default
boolean
visit
(
PolygonSameOrientationError
err
,
ModificationListener
l
)
{
return
false
;
}
...
...
@@ -153,7 +148,7 @@ public interface HealingMethod {
return
false
;
}
default
boolean
visit
(
TooFewPointsError
err
,
ModificationListener
l
)
{
default
boolean
visit
(
Ring
TooFewPointsError
err
,
ModificationListener
l
)
{
return
false
;
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/ManifoldEdgeError.java
→
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/
Non
ManifoldEdgeError.java
View file @
a707fb93
...
...
@@ -36,14 +36,14 @@ import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
* @author Matthias Betz
*
*/
public
class
ManifoldEdgeError
extends
CheckError
{
public
class
Non
ManifoldEdgeError
extends
CheckError
{
private
static
final
long
serialVersionUID
=
-
6742948557014332402L
;
private
List
<
Edge
>
edges
;
private
Geometry
geom
;
public
ManifoldEdgeError
(
Geometry
geom
,
List
<
Edge
>
edges
)
{
public
Non
ManifoldEdgeError
(
Geometry
geom
,
List
<
Edge
>
edges
)
{
super
(
ErrorId
.
GE_S_NON_MANIFOLD_EDGE
,
ErrorType
.
ERROR
,
geom
);
this
.
edges
=
edges
;
this
.
geom
=
geom
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/NormalDeviation
Error
.java
→
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/
NonPlanarPolygon
Normal
s
Deviation.java
View file @
a707fb93
...
...
@@ -34,14 +34,14 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
* @author Matthias Betz
*
*/
public
class
NormalDeviation
Error
extends
CheckError
{
public
class
NonPlanarPolygon
Normal
s
Deviation
extends
CheckError
{
private
static
final
long
serialVersionUID
=
69073161885265794L
;
private
Polygon
p
;
private
double
deviation
;
public
NormalDeviation
Error
(
Polygon
p
,
double
deviation
)
{
public
NonPlanarPolygon
Normal
s
Deviation
(
Polygon
p
,
double
deviation
)
{
super
(
ErrorId
.
GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION
,
ErrorType
.
ERROR
,
p
);
this
.
p
=
p
;
this
.
deviation
=
deviation
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/HoleOutsideError.java
→
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/
Polygon
HoleOutsideError.java
View file @
a707fb93
...
...
@@ -37,14 +37,14 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
* @author Matthias Betz
*
*/
public
class
HoleOutsideError
extends
CheckError
{
public
class
Polygon
HoleOutsideError
extends
CheckError
{
private
static
final
long
serialVersionUID
=
-
4522153084655775231L
;
private
List
<
LinearRing
>
holesOutside
;
private
Polygon
p
;
public
HoleOutsideError
(
Polygon
p
,
List
<
LinearRing
>
holesOutside
)
{
public
Polygon
HoleOutsideError
(
Polygon
p
,
List
<
LinearRing
>
holesOutside
)
{
super
(
ErrorId
.
GE_P_HOLE_OUTSIDE
,
ErrorType
.
ERROR
,
p
);
this
.
p
=
p
;
this
.
holesOutside
=
holesOutside
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/InteriorDisconnectedError.java
→
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/
Polygon
InteriorDisconnectedError.java
View file @
a707fb93
...
...
@@ -37,14 +37,14 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
* @author Matthias Betz
*
*/
public
class
InteriorDisconnectedError
extends
CheckError
{
public
class
Polygon
InteriorDisconnectedError
extends
CheckError
{
private
static
final
long
serialVersionUID
=
511849016699842395L
;
private
Polygon
p
;
private
List
<
LinearRing
>
connectedRings
;
public
InteriorDisconnectedError
(
Polygon
p
,
List
<
LinearRing
>
connectedRings
)
{
public
Polygon
InteriorDisconnectedError
(
Polygon
p
,
List
<
LinearRing
>
connectedRings
)
{
super
(
ErrorId
.
GE_P_INTERIOR_DISCONNECTED
,
ErrorType
.
ERROR
,
p
);
this
.
p
=
p
;
this
.
connectedRings
=
connectedRings
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/SameOrientationError.java
→
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/
Polygon
SameOrientationError.java
View file @
a707fb93
...
...
@@ -35,14 +35,14 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
* @author Matthias Betz
*
*/
public
class
SameOrientationError
extends
CheckError
{
public
class
Polygon
SameOrientationError
extends
CheckError
{
private
static
final
long
serialVersionUID
=
-
6192337889977667459L
;
private
Polygon
p
;
private
LinearRing
innerRing
;
public
SameOrientationError
(
Polygon
p
,
LinearRing
inner
)
{
public
Polygon
SameOrientationError
(
Polygon
p
,
LinearRing
inner
)
{
super
(
ErrorId
.
GE_P_ORIENTATION_RINGS_SAME
,
ErrorType
.
ERROR
,
p
);
this
.
p
=
p
;
this
.
innerRing
=
inner
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/DuplicatePointError.java
→
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/
Ring
DuplicatePointError.java
View file @
a707fb93
...
...
@@ -35,7 +35,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
* @author Matthias Betz
*
*/
public
class
DuplicatePointError
extends
CheckError
{
public
class
Ring
DuplicatePointError
extends
CheckError
{
private
static
final
long
serialVersionUID
=
7208982075173209953L
;
...
...
@@ -43,7 +43,7 @@ public class DuplicatePointError extends CheckError {
private
Vertex
v1
;
private
Vertex
v2
;
public
DuplicatePointError
(
LinearRing
r
,
Vertex
v1
,
Vertex
v2
)
{
public
Ring
DuplicatePointError
(
LinearRing
r
,
Vertex
v1
,
Vertex
v2
)
{
super
(
ErrorId
.
GE_R_SELF_INTERSECTION
,
ErrorType
.
ERROR
,
r
);
this
.
r
=
r
;
this
.
v1
=
v1
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/EdgeIntersectionError.java
→
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/
Ring
EdgeIntersectionError.java
View file @
a707fb93
...
...
@@ -36,7 +36,7 @@ import de.hft.stuttgart.citydoctor2.math.Vector3d;
* @author Matthias Betz
*
*/
public
class
EdgeIntersectionError
extends
CheckError
{
public
class
Ring
EdgeIntersectionError
extends
CheckError
{
private
static
final
long
serialVersionUID
=
4923311259469198172L
;
...
...
@@ -45,7 +45,7 @@ public class EdgeIntersectionError extends CheckError {
private
Vector3d
intersection
;
private
LinearRing
lr
;
public
EdgeIntersectionError
(
LinearRing
lr
,
Edge
e1
,
Edge
e2
,
Vector3d
intersection
)
{
public
Ring
EdgeIntersectionError
(
LinearRing
lr
,
Edge
e1
,
Edge
e2
,
Vector3d
intersection
)
{
super
(
ErrorId
.
GE_R_SELF_INTERSECTION
,
ErrorType
.
ERROR
,
lr
);
if
(
e1
==
null
||
e2
==
null
||
lr
==
null
||
intersection
==
null
)
{
throw
new
IllegalArgumentException
(
"Parameters may not be null"
);
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/RingSelfIntError.java
deleted
100644 → 0
View file @
e6b83505
/*-
* 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.error
;
import
java.util.Set
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.Edge
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
/**
* If two edges of the same linear ring are intersecting with each other, this
* error is created.
*
* @author Matthias Betz
*
*/
public
class
RingSelfIntError
extends
CheckError
{
private
static
final
long
serialVersionUID
=
8007952264635395514L
;
private
LinearRing
lr
;
private
Set
<
Edge
>
edges
;
public
RingSelfIntError
(
LinearRing
lr
,
Set
<
Edge
>
intersectingEdges
)
{
super
(
ErrorId
.
GE_R_SELF_INTERSECTION
,
ErrorType
.
ERROR
,
lr
);
this
.
lr
=
lr
;
edges
=
intersectingEdges
;
}
public
LinearRing
getRing
()
{
return
lr
;
}
public
Set
<
Edge
>
getEdges
()
{
return
edges
;
}
@Override
public
void
report
(
ErrorReport
report
)
{
report
.
add
(
lr
);
}
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
errorVisitor
.
visit
(
this
);
}
@Override
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
return
method
.
visit
(
this
,
l
);
}
@Override
public
String
toString
()
{
return
"RingSelfIntError [lr="
+
lr
+
", edges="
+
edges
+
"]"
;
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/TooFewPointsError.java
→
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/
Ring
TooFewPointsError.java
View file @
a707fb93
...
...
@@ -33,13 +33,13 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing;
* @author Matthias Betz
*
*/
public
class
TooFewPointsError
extends
CheckError
{
public
class
Ring
TooFewPointsError
extends
CheckError
{
private
static
final
long
serialVersionUID
=
7207518573842743261L
;
private
LinearRing
lr
;
public
TooFewPointsError
(
LinearRing
lr
)
{
public
Ring
TooFewPointsError
(
LinearRing
lr
)
{
super
(
ErrorId
.
GE_R_TOO_FEW_POINTS
,
ErrorType
.
ERROR
,
lr
);
this
.
lr
=
lr
;
}
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/geometry/DuplicatePointsCheck.java
View file @
a707fb93
...
...
@@ -31,7 +31,7 @@ import de.hft.stuttgart.citydoctor2.check.CheckType;
import
de.hft.stuttgart.citydoctor2.check.Checkable
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.check.error.ConsecutivePointSameError
;
import
de.hft.stuttgart.citydoctor2.check.error.DuplicatePointError
;
import
de.hft.stuttgart.citydoctor2.check.error.
Ring
DuplicatePointError
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vertex
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
...
...
@@ -116,7 +116,7 @@ public class DuplicatePointsCheck extends Check {
Vertex
point2
=
pointList
.
get
(
j
);
if
(
point1
.
equalsWithEpsilon
(
point2
,
epsilon
))
{
// non consecutive points same
CheckError
err
=
new
DuplicatePointError
(
lr
,
point1
,
point2
);
CheckError
err
=
new
Ring
DuplicatePointError
(
lr
,
point1
,
point2
);
CheckResult
cr
=
new
CheckResult
(
this
,
ResultStatus
.
ERROR
,
err
);
lr
.
addCheckResult
(
cr
);
return
;
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/geometry/HoleOutsideCheck.java
View file @
a707fb93
...
...
@@ -29,7 +29,7 @@ import de.hft.stuttgart.citydoctor2.check.CheckResult;
import
de.hft.stuttgart.citydoctor2.check.CheckType
;
import
de.hft.stuttgart.citydoctor2.check.Checkable
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.check.error.HoleOutsideError
;
import
de.hft.stuttgart.citydoctor2.check.error.
Polygon
HoleOutsideError
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vertex
;
...
...
@@ -79,7 +79,7 @@ public class HoleOutsideCheck extends Check {
CheckResult
cr
=
new
CheckResult
(
this
,
ResultStatus
.
OK
,
null
);
p
.
addCheckResult
(
cr
);
}
else
{
CheckError
err
=
new
HoleOutsideError
(
p
,
holesOutside
);
CheckError
err
=
new
Polygon
HoleOutsideError
(
p
,
holesOutside
);
CheckResult
cr
=
new
CheckResult
(
this
,
ResultStatus
.
ERROR
,
err
);
p
.
addCheckResult
(
cr
);
}
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/geometry/InteriorDisconnectedCheck.java
View file @
a707fb93
...
...
@@ -33,7 +33,7 @@ import de.hft.stuttgart.citydoctor2.check.Checkable;
import
de.hft.stuttgart.citydoctor2.check.DefaultParameter
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.check.Unit
;
import
de.hft.stuttgart.citydoctor2.check.error.InteriorDisconnectedError
;
import
de.hft.stuttgart.citydoctor2.check.error.
Polygon
InteriorDisconnectedError
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vertex
;
...
...
@@ -112,7 +112,7 @@ public class InteriorDisconnectedCheck extends Check {
// collect rings
node
.
resetVisit
();
List
<
LinearRing
>
connectedRings
=
node
.
getConnectedRings
();
CheckError
err
=
new
InteriorDisconnectedError
(
p
,
connectedRings
);
CheckError
err
=
new
Polygon
InteriorDisconnectedError
(
p
,
connectedRings
);
CheckResult
cr
=
new
CheckResult
(
this
,
ResultStatus
.
ERROR
,
err
);
p
.
addCheckResult
(
cr
);
return
;
...
...
@@ -139,7 +139,7 @@ public class InteriorDisconnectedCheck extends Check {
List
<
LinearRing
>
connectedRings
=
new
ArrayList
<>();
connectedRings
.
add
(
n1
.
getValue
());
connectedRings
.
add
(
n2
.
getValue
());
CheckError
err
=
new
InteriorDisconnectedError
(
p
,
connectedRings
);
CheckError
err
=
new
Polygon
InteriorDisconnectedError
(
p
,
connectedRings
);
CheckResult
cr
=
new
CheckResult
(
this
,
ResultStatus
.
ERROR
,
err
);
p
.
addCheckResult
(
cr
);
return
true
;
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/geometry/NonManifoldEdgeCheck.java
View file @
a707fb93
...
...
@@ -29,7 +29,7 @@ import de.hft.stuttgart.citydoctor2.check.CheckResult;
import
de.hft.stuttgart.citydoctor2.check.CheckType
;
import
de.hft.stuttgart.citydoctor2.check.Checkable
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.check.error.ManifoldEdgeError
;
import
de.hft.stuttgart.citydoctor2.check.error.
Non
ManifoldEdgeError
;
import
de.hft.stuttgart.citydoctor2.datastructure.Edge
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.GeometryType
;
...
...
@@ -85,7 +85,7 @@ public class NonManifoldEdgeCheck extends Check {
if
(
errorEdges
.
isEmpty
())
{
cr
=
new
CheckResult
(
this
,
ResultStatus
.
OK
,
null
);
}
else
{
CheckError
err
=
new
ManifoldEdgeError
(
g
,
errorEdges
);
CheckError
err
=
new
Non
ManifoldEdgeError
(
g
,
errorEdges
);
cr
=
new
CheckResult
(
this
,
ResultStatus
.
ERROR
,
err
);
}
g
.
addCheckResult
(
cr
);
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/geometry/NumPointsCheck.java
View file @
a707fb93
...
...
@@ -31,7 +31,7 @@ import de.hft.stuttgart.citydoctor2.check.CheckResult;
import
de.hft.stuttgart.citydoctor2.check.CheckType
;
import
de.hft.stuttgart.citydoctor2.check.Checkable
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.check.error.TooFewPointsError
;
import
de.hft.stuttgart.citydoctor2.check.error.
Ring
TooFewPointsError
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vertex
;
...
...
@@ -90,7 +90,7 @@ public class NumPointsCheck extends Check {
// 2 points or less = always error
if
(
vertices
.
size
()
-
numberOfContainingNeighbors
<
3
)
{
CheckError
err
=
new
TooFewPointsError
(
lr
);
CheckError
err
=
new
Ring
TooFewPointsError
(
lr
);
CheckResult
cr
=
new
CheckResult
(
this
,
ResultStatus
.
ERROR
,
err
);
lr
.
addCheckResult
(
cr
);
return
;
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/geometry/PlanarCheck.java
View file @
a707fb93
...
...
@@ -34,7 +34,7 @@ import de.hft.stuttgart.citydoctor2.check.DefaultParameter;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.check.Unit
;
import
de.hft.stuttgart.citydoctor2.check.error.NonPlanarPolygonDistancePlaneError
;
import
de.hft.stuttgart.citydoctor2.check.error.NormalDeviation
Error
;
import
de.hft.stuttgart.citydoctor2.check.error.
NonPlanarPolygon
Normal
s
Deviation
;
import
de.hft.stuttgart.citydoctor2.check.error.TinyEdgeError
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
...
...
@@ -165,7 +165,7 @@ public class PlanarCheck extends Check {
double
deviation
=
normal
.
dot
(
averageNormal
);
double
radiant
=
Math
.
acos
(
deviation
);
if
(
radiant
>
rad
)
{
CheckError
err
=
new
NormalDeviation
Error
(
p
,
radiant
);
CheckError
err
=
new
NonPlanarPolygon
Normal
s
Deviation
(
p
,
radiant
);
CheckResult
cr
=
new
CheckResult
(
this
,
ResultStatus
.
ERROR
,
err
);
p
.
addCheckResult
(
cr
);
return
;
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/geometry/PolygonSameOrientationCheck.java
View file @
a707fb93