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
1745865f
Commit
1745865f
authored
Aug 08, 2024
by
Riegel
Browse files
Code cleaning Ref
#69
parent
5a6f4b46
Changes
163
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/TypeFilter.java
View file @
1745865f
...
@@ -23,21 +23,11 @@ import de.hft.stuttgart.citydoctor2.datastructure.FeatureType;
...
@@ -23,21 +23,11 @@ import de.hft.stuttgart.citydoctor2.datastructure.FeatureType;
/**
/**
* Filters the feature type of features
* Filters the feature type of features
*
* @author Matthias Betz
*
*
* @author Matthias Betz
*/
*/
public
class
TypeFilter
implements
Filter
{
public
record
TypeFilter
(
FeatureType
type
)
implements
Filter
{
private
FeatureType
type
;
public
TypeFilter
(
FeatureType
type
)
{
this
.
type
=
type
;
}
public
FeatureType
getType
()
{
return
type
;
}
@Override
@Override
public
boolean
matches
(
CityObject
co
)
{
public
boolean
matches
(
CityObject
co
)
{
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/ValidationConfiguration.java
View file @
1745865f
...
@@ -18,14 +18,7 @@
...
@@ -18,14 +18,7 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.check
;
package
de.hft.stuttgart.citydoctor2.check
;
import
java.io.BufferedWriter
;
import
java.io.*
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.FileWriter
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.Serializable
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Map.Entry
;
...
@@ -56,6 +49,7 @@ public class ValidationConfiguration implements Serializable {
...
@@ -56,6 +49,7 @@ public class ValidationConfiguration implements Serializable {
public
static
final
String
CHECK_FOR_SOLID_XML
=
"checkForSolid.xml"
;
public
static
final
String
CHECK_FOR_SOLID_XML
=
"checkForSolid.xml"
;
private
static
final
String
NUMBER_OF_ROUNDING_PLACES_DEFAULT
=
"8"
;
private
static
final
String
NUMBER_OF_ROUNDING_PLACES_DEFAULT
=
"8"
;
private
static
final
String
MIN_VERTEX_DISTANCE_DEFAULT
=
"0.0001"
;
private
static
final
String
MIN_VERTEX_DISTANCE_DEFAULT
=
"0.0001"
;
@Serial
private
static
final
long
serialVersionUID
=
-
8020055032177740646L
;
private
static
final
long
serialVersionUID
=
-
8020055032177740646L
;
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
ValidationConfiguration
.
class
);
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
ValidationConfiguration
.
class
);
...
@@ -179,9 +173,9 @@ public class ValidationConfiguration implements Serializable {
...
@@ -179,9 +173,9 @@ public class ValidationConfiguration implements Serializable {
return
cConfig
;
return
cConfig
;
});
});
}
}
globalParameters
.
com
put
e
IfAbsent
(
GlobalParameters
.
MIN_VERTEX_DISTANCE
,
k
->
MIN_VERTEX_DISTANCE_DEFAULT
);
globalParameters
.
putIfAbsent
(
GlobalParameters
.
MIN_VERTEX_DISTANCE
,
MIN_VERTEX_DISTANCE_DEFAULT
);
globalParameters
.
com
put
e
IfAbsent
(
GlobalParameters
.
NUMBER_OF_ROUNDING_PLACES
,
globalParameters
.
putIfAbsent
(
GlobalParameters
.
NUMBER_OF_ROUNDING_PLACES
,
k
->
NUMBER_OF_ROUNDING_PLACES_DEFAULT
);
NUMBER_OF_ROUNDING_PLACES_DEFAULT
);
}
}
public
int
getNumberOfRoundingPlaces
()
{
public
int
getNumberOfRoundingPlaces
()
{
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/util/SelfIntersectionUtil.java
View file @
1745865f
...
@@ -93,7 +93,7 @@ public class SelfIntersectionUtil {
...
@@ -93,7 +93,7 @@ public class SelfIntersectionUtil {
List
<
PolygonIntersection
>
intersections
=
new
ArrayList
<>();
List
<
PolygonIntersection
>
intersections
=
new
ArrayList
<>();
MeshSurface
meshSurface
=
MeshSurface
.
of
(
g
);
MeshSurface
meshSurface
=
MeshSurface
.
of
(
g
);
Map
<
Polygon
,
EdgePolygon
>
edgePolyMap
=
new
IdentityHashMap
<>();
Map
<
Polygon
,
EdgePolygon
>
edgePolyMap
=
new
IdentityHashMap
<>();
for
(
EdgePolygon
poly
:
meshSurface
.
getP
olygons
())
{
for
(
EdgePolygon
poly
:
meshSurface
.
p
olygons
())
{
edgePolyMap
.
put
(
poly
.
getOriginal
(),
poly
);
edgePolyMap
.
put
(
poly
.
getOriginal
(),
poly
);
}
}
for
(
int
i
=
0
;
i
<
polygons
.
size
()
-
1
;
i
++)
{
for
(
int
i
=
0
;
i
<
polygons
.
size
()
-
1
;
i
++)
{
...
...
Prev
1
…
5
6
7
8
9
Next
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