Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
85cf93b6
Commit
85cf93b6
authored
Mar 12, 2021
by
Matthias Betz
Browse files
reworked check engine now working on requirements
parent
35577785
Pipeline
#2108
passed with stage
in 3 minutes and 6 seconds
Changes
66
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/systemtest/TestUtil.java
View file @
85cf93b6
...
...
@@ -23,7 +23,6 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.Checker
;
import
de.hft.stuttgart.citydoctor2.check.ValidationConfiguration
;
import
de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel
;
...
...
@@ -52,7 +51,7 @@ public class TestUtil {
public
static
CityDoctorModel
loadAndCheckCityModel
(
String
path
,
int
numberOfRoundingPlaces
)
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
ValidationConfiguration
config
=
ValidationConfiguration
.
loadStandardValidationConfig
();
config
.
setNumberOfRoundingPlaces
(
numberOfRoundingPlaces
);
config
.
setNumberOfRoundingPlaces
InGlobalParameters
(
numberOfRoundingPlaces
);
CityDoctorModel
m
=
CityGmlParser
.
parseCityGmlFile
(
path
,
config
.
getParserConfiguration
());
Checker
c
=
new
Checker
(
config
,
m
);
c
.
runChecks
();
...
...
@@ -63,8 +62,8 @@ public class TestUtil {
public
static
CityDoctorModel
loadAndCheckCityModel
(
String
path
,
int
numberOfRoundingPlaces
,
double
minVertexDistance
)
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
ValidationConfiguration
config
=
ValidationConfiguration
.
loadStandardValidationConfig
();
config
.
setNumberOfRoundingPlaces
(
numberOfRoundingPlaces
);
config
.
setMinVertexDistance
(
minVertexDistance
);
config
.
setNumberOfRoundingPlaces
InGlobalParameters
(
numberOfRoundingPlaces
);
config
.
setMinVertexDistance
InGlobalParameters
(
minVertexDistance
);
CityDoctorModel
m
=
CityGmlParser
.
parseCityGmlFile
(
path
,
config
.
getParserConfiguration
());
Checker
c
=
new
Checker
(
config
,
m
);
c
.
runChecks
();
...
...
@@ -72,11 +71,11 @@ public class TestUtil {
}
public
static
CityDoctorModel
loadAndCheckCityModel
(
String
path
,
Map
<
CheckId
,
Map
<
String
,
String
>>
paramMap
)
public
static
CityDoctorModel
loadAndCheckCityModel
(
String
path
,
Map
<
String
,
Map
<
String
,
String
>>
paramMap
)
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
ValidationConfiguration
valConfig
=
ValidationConfiguration
.
loadStandardValidationConfig
();
for
(
Entry
<
CheckId
,
Map
<
String
,
String
>>
e
:
paramMap
.
entrySet
())
{
valConfig
.
get
Check
s
().
get
(
e
.
getKey
()).
s
etParameters
(
e
.
getValue
());
for
(
Entry
<
String
,
Map
<
String
,
String
>>
e
:
paramMap
.
entrySet
())
{
valConfig
.
get
Requirement
s
().
get
(
e
.
getKey
()).
g
etParameters
(
).
putAll
(
e
.
getValue
());
}
CityDoctorModel
m
=
CityGmlParser
.
parseCityGmlFile
(
path
,
valConfig
.
getParserConfiguration
());
Checker
c
=
new
Checker
(
valConfig
,
m
);
...
...
CityDoctorParent/CityDoctorValidation/src/test/resources/testConfig.yml
View file @
85cf93b6
numberOfRoundingPlaces
:
8
globalParameters
:
numberOfRoundingPlaces
:
8
# in m
minVertexDistance
:
0.0001
schematronFilePath
:
'
'
useStreaming
:
false
xmlValidation
:
false
check
s
:
C
_GE_R_TOO_FEW_POINTS
:
requirement
s
:
R
_GE_R_TOO_FEW_POINTS
:
enabled
:
true
C
_GE_R_NOT_CLOSED
:
R
_GE_R_NOT_CLOSED
:
enabled
:
true
C
_GE_R_
DUPLICAT
E_POINT
:
R
_GE_R_
CONSECUTIV
E_POINT
S_SAME
:
enabled
:
true
C
_GE_R_SELF_INTERSECTION
:
R
_GE_R_SELF_INTERSECTION
:
enabled
:
true
C
_GE_S_MULTIPLE_CONNECTED_COMPONENTS
:
R
_GE_S_MULTIPLE_CONNECTED_COMPONENTS
:
enabled
:
true
C
_GE_P_INTERIOR_DISCONNECTED
:
R
_GE_P_INTERIOR_DISCONNECTED
:
enabled
:
true
C
_GE_P_INTERSECTING_RINGS
:
R
_GE_P_INTERSECTING_RINGS
:
enabled
:
true
C
_GE_P_NON_PLANAR
:
R
_GE_P_NON_PLANAR
:
enabled
:
false
parameters
:
# one of ("distance", "angle", "both")
type
:
distance
# in m
distanceTolerance
:
0.01
angleTolerance
:
0.1
C_GE_P_HOLE_OUTSIDE
:
# in degree
angleTolerance
:
1
# in m
degeneratedPolygonTolerance
:
0
R_GE_P_HOLE_OUTSIDE
:
enabled
:
true
C
_GE_P_ORIENTATION_RINGS_SAME
:
R
_GE_P_ORIENTATION_RINGS_SAME
:
enabled
:
true
C
_GE_P_INNER_RINGS_NESTED
:
R
_GE_P_INNER_RINGS_NESTED
:
enabled
:
true
C
_GE_S_TOO_FEW_POLYGONS
:
R
_GE_S_TOO_FEW_POLYGONS
:
enabled
:
true
C
_GE_S_NOT_CLOSED
:
R
_GE_S_NOT_CLOSED
:
enabled
:
true
C
_GE_S_NON_MANIFOLD_EDGE
:
R
_GE_S_NON_MANIFOLD_EDGE
:
enabled
:
true
C
_GE_S_POLYGON_WRONG_ORIENTATION
:
R
_GE_S_POLYGON_WRONG_ORIENTATION
:
enabled
:
true
C
_GE_S_ALL_POLYGONS_WRONG_ORIENTATION
:
R
_GE_S_ALL_POLYGONS_WRONG_ORIENTATION
:
enabled
:
true
C
_GE_S_NON_MANIFOLD_VERTEX
:
R
_GE_S_NON_MANIFOLD_VERTEX
:
enabled
:
true
C
_GE_S_SELF_INTERSECTION
:
R
_GE_S_SELF_INTERSECTION
:
enabled
:
true
\ No newline at end of file
CityDoctorParent/CityDoctorValidation/src/test/resources/testConfigWithExclude.yml
View file @
85cf93b6
numberOfRoundingPlaces
:
8
globalParameters
:
numberOfRoundingPlaces
:
8
minVertexDistance
:
0.0001
filter
:
exclude
:
# available types: BUILDING, VEGETATION, TRANSPORTATION, BRIDGE, LAND, WATER
...
...
@@ -6,45 +8,47 @@ filter:
-
BUILDING
# exlude matching ids (Regex)
ids
:
check
s
:
C
_GE_R_TOO_FEW_POINTS
:
requirement
s
:
R
_GE_R_TOO_FEW_POINTS
:
enabled
:
true
C
_GE_R_NOT_CLOSED
:
R
_GE_R_NOT_CLOSED
:
enabled
:
true
C
_GE_R_
DUPLICAT
E_POINT
:
R
_GE_R_
CONSECUTIV
E_POINT
S_SAME
:
enabled
:
true
C
_GE_R_SELF_INTERSECTION
:
R
_GE_R_SELF_INTERSECTION
:
enabled
:
true
C
_GE_S_MULTIPLE_CONNECTED_COMPONENTS
:
R
_GE_S_MULTIPLE_CONNECTED_COMPONENTS
:
enabled
:
true
C
_GE_P_INTERIOR_DISCONNECTED
:
R
_GE_P_INTERIOR_DISCONNECTED
:
enabled
:
true
C
_GE_P_INTERSECTING_RINGS
:
R
_GE_P_INTERSECTING_RINGS
:
enabled
:
true
C
_GE_P_NON_PLANAR
:
R
_GE_P_NON_PLANAR
:
enabled
:
false
parameters
:
# one of ("distance", "angle", "both")
type
:
distance
# in m
distanceTolerance
:
0.01
angleTolerance
:
0.1
C_GE_P_HOLE_OUTSIDE
:
# in degree
angleTolerance
:
1
R_GE_P_HOLE_OUTSIDE
:
enabled
:
true
C
_GE_P_ORIENTATION_RINGS_SAME
:
R
_GE_P_ORIENTATION_RINGS_SAME
:
enabled
:
true
C
_GE_P_INNER_RINGS_NESTED
:
R
_GE_P_INNER_RINGS_NESTED
:
enabled
:
true
C
_GE_S_TOO_FEW_POLYGONS
:
R
_GE_S_TOO_FEW_POLYGONS
:
enabled
:
true
C
_GE_S_NOT_CLOSED
:
R
_GE_S_NOT_CLOSED
:
enabled
:
true
C
_GE_S_NON_MANIFOLD_EDGE
:
R
_GE_S_NON_MANIFOLD_EDGE
:
enabled
:
true
C
_GE_S_POLYGON_WRONG_ORIENTATION
:
R
_GE_S_POLYGON_WRONG_ORIENTATION
:
enabled
:
true
C
_GE_S_ALL_POLYGONS_WRONG_ORIENTATION
:
R
_GE_S_ALL_POLYGONS_WRONG_ORIENTATION
:
enabled
:
true
C
_GE_S_NON_MANIFOLD_VERTEX
:
R
_GE_S_NON_MANIFOLD_VERTEX
:
enabled
:
true
C
_GE_S_SELF_INTERSECTION
:
R
_GE_S_SELF_INTERSECTION
:
enabled
:
true
\ No newline at end of file
CityDoctorParent/CityDoctorValidation/src/test/resources/testConfigWithFilter.yml
View file @
85cf93b6
numberOfRoundingPlaces
:
8
globalParameters
:
numberOfRoundingPlaces
:
8
# in m
minVertexDistance
:
0.0001
filter
:
include
:
# available types: BUILDING, VEGETATION, TRANSPORTATION, BRIDGE, LAND, WATER
...
...
@@ -27,45 +30,47 @@ filter:
-
UUID-8972-kghf-asgv
-
UUID-567-asdf-GEGH
-
UUID.*
check
s
:
C
_GE_R_TOO_FEW_POINTS
:
requirement
s
:
R
_GE_R_TOO_FEW_POINTS
:
enabled
:
true
C
_GE_R_NOT_CLOSED
:
R
_GE_R_NOT_CLOSED
:
enabled
:
true
C
_GE_R_
DUPLICAT
E_POINT
:
R
_GE_R_
CONSECUTIV
E_POINT
S_SAME
:
enabled
:
true
C
_GE_R_SELF_INTERSECTION
:
R
_GE_R_SELF_INTERSECTION
:
enabled
:
true
C
_GE_S_MULTIPLE_CONNECTED_COMPONENTS
:
R
_GE_S_MULTIPLE_CONNECTED_COMPONENTS
:
enabled
:
true
C
_GE_P_INTERIOR_DISCONNECTED
:
R
_GE_P_INTERIOR_DISCONNECTED
:
enabled
:
true
C
_GE_P_INTERSECTING_RINGS
:
R
_GE_P_INTERSECTING_RINGS
:
enabled
:
true
C
_GE_P_NON_PLANAR
:
R
_GE_P_NON_PLANAR
:
enabled
:
false
parameters
:
# one of ("distance", "angle", "both")
type
:
distance
# in m
distanceTolerance
:
0.01
angleTolerance
:
0.1
C_GE_P_HOLE_OUTSIDE
:
# in degree
angleTolerance
:
1
R_GE_P_HOLE_OUTSIDE
:
enabled
:
true
C
_GE_P_ORIENTATION_RINGS_SAME
:
R
_GE_P_ORIENTATION_RINGS_SAME
:
enabled
:
true
C
_GE_P_INNER_RINGS_NESTED
:
R
_GE_P_INNER_RINGS_NESTED
:
enabled
:
true
C
_GE_S_TOO_FEW_POLYGONS
:
R
_GE_S_TOO_FEW_POLYGONS
:
enabled
:
true
C
_GE_S_NOT_CLOSED
:
R
_GE_S_NOT_CLOSED
:
enabled
:
true
C
_GE_S_NON_MANIFOLD_EDGE
:
R
_GE_S_NON_MANIFOLD_EDGE
:
enabled
:
true
C
_GE_S_POLYGON_WRONG_ORIENTATION
:
R
_GE_S_POLYGON_WRONG_ORIENTATION
:
enabled
:
true
C
_GE_S_ALL_POLYGONS_WRONG_ORIENTATION
:
R
_GE_S_ALL_POLYGONS_WRONG_ORIENTATION
:
enabled
:
true
C
_GE_S_NON_MANIFOLD_VERTEX
:
R
_GE_S_NON_MANIFOLD_VERTEX
:
enabled
:
true
C
_GE_S_SELF_INTERSECTION
:
R
_GE_S_SELF_INTERSECTION
:
enabled
:
true
\ No newline at end of file
CityDoctorParent/CityDoctorValidation/src/test/resources/testConfigWithInclude.yml
View file @
85cf93b6
numberOfRoundingPlaces
:
8
globalParameters
:
numberOfRoundingPlaces
:
8
filter
:
include
:
# available types: BUILDING, VEGETATION, TRANSPORTATION, BRIDGE, LAND, WATER
types
:
-
TRANSPORTATION
check
s
:
C
_GE_R_TOO_FEW_POINTS
:
requirement
s
:
R
_GE_R_TOO_FEW_POINTS
:
enabled
:
true
C
_GE_R_NOT_CLOSED
:
R
_GE_R_NOT_CLOSED
:
enabled
:
true
C
_GE_R_
DUPLICAT
E_POINT
:
R
_GE_R_
CONSECUTIV
E_POINT
S_SAME
:
enabled
:
true
C
_GE_R_SELF_INTERSECTION
:
R
_GE_R_SELF_INTERSECTION
:
enabled
:
true
C
_GE_S_MULTIPLE_CONNECTED_COMPONENTS
:
R
_GE_S_MULTIPLE_CONNECTED_COMPONENTS
:
enabled
:
true
C
_GE_P_INTERIOR_DISCONNECTED
:
R
_GE_P_INTERIOR_DISCONNECTED
:
enabled
:
true
C
_GE_P_INTERSECTING_RINGS
:
R
_GE_P_INTERSECTING_RINGS
:
enabled
:
true
C
_GE_P_NON_PLANAR
:
R
_GE_P_NON_PLANAR
:
enabled
:
false
parameters
:
# one of ("distance", "angle", "both")
type
:
distance
distanceTolerance
:
0.01
angleTolerance
:
0.1
C
_GE_P_HOLE_OUTSIDE
:
R
_GE_P_HOLE_OUTSIDE
:
enabled
:
true
C
_GE_P_ORIENTATION_RINGS_SAME
:
R
_GE_P_ORIENTATION_RINGS_SAME
:
enabled
:
true
C
_GE_P_INNER_RINGS_NESTED
:
R
_GE_P_INNER_RINGS_NESTED
:
enabled
:
true
C
_GE_S_TOO_FEW_POLYGONS
:
R
_GE_S_TOO_FEW_POLYGONS
:
enabled
:
true
C
_GE_S_NOT_CLOSED
:
R
_GE_S_NOT_CLOSED
:
enabled
:
true
C
_GE_S_NON_MANIFOLD_EDGE
:
R
_GE_S_NON_MANIFOLD_EDGE
:
enabled
:
true
C
_GE_S_POLYGON_WRONG_ORIENTATION
:
R
_GE_S_POLYGON_WRONG_ORIENTATION
:
enabled
:
true
C
_GE_S_ALL_POLYGONS_WRONG_ORIENTATION
:
R
_GE_S_ALL_POLYGONS_WRONG_ORIENTATION
:
enabled
:
true
C
_GE_S_NON_MANIFOLD_VERTEX
:
R
_GE_S_NON_MANIFOLD_VERTEX
:
enabled
:
true
C
_GE_S_SELF_INTERSECTION
:
R
_GE_S_SELF_INTERSECTION
:
enabled
:
true
\ No newline at end of file
CityDoctorParent/CityDoctorValidation/src/test/resources/testConfigWithStreaming.yml
View file @
85cf93b6
numberOfRoundingPlaces
:
8
globalParameters
:
numberOfRoundingPlaces
:
8
schematronFilePath
:
src/test/resources/schematronTest.xml
useStreaming
:
true
schematronFilePath
:
src/test/resources/schematronTest.xml
checks
:
C_GE_R_TOO_FEW_POINTS
:
requirements
:
R_GE_R_TOO_FEW_POINTS
:
enabled
:
true
C
_GE_R_NOT_CLOSED
:
R
_GE_R_NOT_CLOSED
:
enabled
:
true
C
_GE_R_
DUPLICAT
E_POINT
:
R
_GE_R_
CONSECUTIV
E_POINT
S_SAME
:
enabled
:
true
C
_GE_R_SELF_INTERSECTION
:
R
_GE_R_SELF_INTERSECTION
:
enabled
:
true
C
_GE_S_MULTIPLE_CONNECTED_COMPONENTS
:
R
_GE_S_MULTIPLE_CONNECTED_COMPONENTS
:
enabled
:
true
C
_GE_P_INTERIOR_DISCONNECTED
:
R
_GE_P_INTERIOR_DISCONNECTED
:
enabled
:
true
C
_GE_P_INTERSECTING_RINGS
:
R
_GE_P_INTERSECTING_RINGS
:
enabled
:
true
C
_GE_P_NON_PLANAR
:
R
_GE_P_NON_PLANAR
:
enabled
:
false
parameters
:
# one of ("distance", "angle", "both")
type
:
distance
distanceTolerance
:
0.01
angleTolerance
:
0.1
C
_GE_P_HOLE_OUTSIDE
:
R
_GE_P_HOLE_OUTSIDE
:
enabled
:
true
C
_GE_P_ORIENTATION_RINGS_SAME
:
R
_GE_P_ORIENTATION_RINGS_SAME
:
enabled
:
true
C
_GE_P_INNER_RINGS_NESTED
:
R
_GE_P_INNER_RINGS_NESTED
:
enabled
:
true
C
_GE_S_TOO_FEW_POLYGONS
:
R
_GE_S_TOO_FEW_POLYGONS
:
enabled
:
true
C
_GE_S_NOT_CLOSED
:
R
_GE_S_NOT_CLOSED
:
enabled
:
true
C
_GE_S_NON_MANIFOLD_EDGE
:
R
_GE_S_NON_MANIFOLD_EDGE
:
enabled
:
true
C
_GE_S_POLYGON_WRONG_ORIENTATION
:
R
_GE_S_POLYGON_WRONG_ORIENTATION
:
enabled
:
true
C
_GE_S_ALL_POLYGONS_WRONG_ORIENTATION
:
R
_GE_S_ALL_POLYGONS_WRONG_ORIENTATION
:
enabled
:
true
C
_GE_S_NON_MANIFOLD_VERTEX
:
R
_GE_S_NON_MANIFOLD_VERTEX
:
enabled
:
true
C
_GE_S_SELF_INTERSECTION
:
R
_GE_S_SELF_INTERSECTION
:
enabled
:
true
\ No newline at end of file
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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