Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
7b16c17e
Commit
7b16c17e
authored
8 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Code cleaning. Ref
#69
parent
ef767f40
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/Requirement.java
+3
-6
.../java/de/hft/stuttgart/citydoctor2/check/Requirement.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TinObject.java
+2
-0
...de/hft/stuttgart/citydoctor2/datastructure/TinObject.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TransportationObject.java
+1
-5
...tgart/citydoctor2/datastructure/TransportationObject.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/math/ProjectionAxis.java
+1
-1
...ava/de/hft/stuttgart/citydoctor2/math/ProjectionAxis.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/math/Vector3d.java
+3
-5
...main/java/de/hft/stuttgart/citydoctor2/math/Vector3d.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/parser/ParserConfiguration.java
+2
-2
...hft/stuttgart/citydoctor2/parser/ParserConfiguration.java
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/util/SelfIntersectionUtil.java
+1
-1
...uttgart/citydoctor2/checks/util/SelfIntersectionUtil.java
with
13 additions
and
20 deletions
+13
-20
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/Requirement.java
+
3
-
6
View file @
7b16c17e
...
...
@@ -128,12 +128,9 @@ public class Requirement implements Serializable {
return
false
;
Requirement
other
=
(
Requirement
)
obj
;
if
(
id
==
null
)
{
if
(
other
.
id
!=
null
)
return
false
;
}
else
if
(!
id
.
equals
(
other
.
id
))
return
false
;
return
true
;
}
return
other
.
id
==
null
;
}
else
return
id
.
equals
(
other
.
id
);
}
@Override
public
String
toString
()
{
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TinObject.java
+
2
-
0
View file @
7b16c17e
...
...
@@ -18,6 +18,7 @@
*/
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
java.io.Serial
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -38,6 +39,7 @@ public class TinObject extends CityObject {
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
TinObject
.
class
);
@Serial
private
static
final
long
serialVersionUID
=
1910744427384724422L
;
private
final
TINRelief
gmlRelief
;
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TransportationObject.java
+
1
-
5
View file @
7b16c17e
...
...
@@ -236,11 +236,7 @@ public class TransportationObject extends CityObject {
@Override
public
void
unsetGmlGeometries
()
{
switch
(
type
)
{
case
ROAD:
case
TRACK:
case
RAILWAY:
case
SQUARE:
case
TRANSPORTATION_COMPLEX:
case
ROAD
,
TRACK
,
RAILWAY
,
SQUARE
,
TRANSPORTATION_COMPLEX:
AbstractTransportationSpace
tc
=
(
AbstractTransportationSpace
)
ato
;
tc
.
getDeprecatedProperties
().
setLod1MultiSurface
(
null
);
tc
.
setLod2MultiSurface
(
null
);
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/math/ProjectionAxis.java
+
1
-
1
View file @
7b16c17e
...
...
@@ -134,7 +134,7 @@ public class ProjectionAxis {
double
x
=
(
d
-
b
*
y
-
c
*
z
)
/
a
;
return
new
Vertex
(
x
,
y
,
z
);
}
else
{
throw
new
IllegalStateException
(
"Unknown axis: "
+
axis
);
throw
new
IllegalStateException
(
"Unknown axis: "
+
Arrays
.
toString
(
axis
)
)
;
}
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/math/Vector3d.java
+
3
-
5
View file @
7b16c17e
...
...
@@ -240,11 +240,9 @@ public class Vector3d implements Serializable {
@Override
public
String
toString
()
{
final
int
maxLen
=
5
;
StringBuilder
builder
=
new
StringBuilder
();
builder
.
append
(
"Vector3d [coords="
);
builder
.
append
(
coords
!=
null
?
Arrays
.
toString
(
Arrays
.
copyOf
(
coords
,
Math
.
min
(
coords
.
length
,
maxLen
)))
:
null
);
builder
.
append
(
"]"
);
return
builder
.
toString
();
return
"Vector3d [coords="
+
(
coords
!=
null
?
Arrays
.
toString
(
Arrays
.
copyOf
(
coords
,
Math
.
min
(
coords
.
length
,
maxLen
)))
:
null
)
+
"]"
;
}
@Override
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/parser/ParserConfiguration.java
+
2
-
2
View file @
7b16c17e
...
...
@@ -91,8 +91,8 @@ public class ParserConfiguration implements Serializable {
}
private
void
createCoordinateTransforms
()
{
CoordinateReferenceSystem
tgtCrs
=
null
;
CoordinateReferenceSystem
crs
=
null
;
CoordinateReferenceSystem
tgtCrs
;
CoordinateReferenceSystem
crs
;
synchronized
(
CRS_FACTORY
)
{
tgtCrs
=
CRS_FACTORY
.
createFromParameters
(
"Target"
,
targetTransformString
);
crs
=
CRS_FACTORY
.
createFromParameters
(
"Original"
,
originalTransformString
);
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/util/SelfIntersectionUtil.java
+
1
-
1
View file @
7b16c17e
...
...
@@ -412,7 +412,7 @@ public class SelfIntersectionUtil {
Triangle3d
t2
=
p2
.
getTriangles
().
get
(
p2Index
);
if
(
t1
.
doesIntersect
(
t2
))
{
logger
.
trace
(
"{} intersects {}"
,
t1
,
t2
);
logger
.
trace
(
"{} intersects {}"
,
t1
.
getPartOf
().
getOriginal
().
getGmlId
(),
logger
.
trace
(
"
GML-ID:
{} intersects {}"
,
t1
.
getPartOf
().
getOriginal
().
getGmlId
(),
t2
.
getPartOf
().
getOriginal
().
getGmlId
());
return
new
GeometrySelfIntersection
(
t1
.
getPartOf
().
getOriginal
(),
t2
.
getPartOf
().
getOriginal
(),
t1
,
t2
);
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets