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
f9f4046f
Commit
f9f4046f
authored
Jul 26, 2024
by
Riegel
Browse files
Excluded the false-positive self-intersection tests with big meshes from Maven
parent
006bb2b0
Pipeline
#10017
passed with stage
in 1 minute and 10 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/checks/geometry/SolidSelfIntCheckFalsePositiveBigMeshTest.java
0 → 100644
View file @
f9f4046f
package
de.hft.stuttgart.citydoctor2.checks.geometry
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
org.junit.Test
;
import
de.hft.stuttgart.citydoctor2.check.CheckResult
;
import
de.hft.stuttgart.citydoctor2.check.Checker
;
import
de.hft.stuttgart.citydoctor2.check.ResultStatus
;
import
de.hft.stuttgart.citydoctor2.check.ValidationConfiguration
;
import
de.hft.stuttgart.citydoctor2.datastructure.Building
;
import
de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.GeometryType
;
import
de.hft.stuttgart.citydoctor2.datastructure.Lod
;
import
de.hft.stuttgart.citydoctor2.parser.CityGmlParseException
;
import
de.hft.stuttgart.citydoctor2.parser.CityGmlParser
;
import
de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException
;
/**
* Additional Test-Cases for known False-Positives for self intersection.
* These tests use building models which have big meshes.
* Excluded from Maven test-phase due to the limited memory of the
* CI/CD-Runners.
*
* @author Riegel
*/
public
class
SolidSelfIntCheckFalsePositiveBigMeshTest
{
private
void
testFalsePositiveExample
(
String
gml_filepath
)
throws
CityGmlParseException
,
InvalidGmlFileException
{
ValidationConfiguration
config
=
ValidationConfiguration
.
loadStandardValidationConfig
();
config
.
setSchematronFilePathInGlobalParameters
(
null
);
CityDoctorModel
m
=
CityGmlParser
.
parseCityGmlFile
(
gml_filepath
,
config
.
getParserConfiguration
());
Checker
c
=
new
Checker
(
config
,
m
);
c
.
runChecks
();
Building
building
=
m
.
getBuildings
().
get
(
0
);
System
.
out
.
println
(
building
.
containsAnyError
());
/*
* The examples have no actual self-intersections, but can contain other actual model defects.
* If an error is detected, it is thus required to check if the
* False-Positive self-intersection triggered it.
*/
if
(
building
.
containsAnyError
())
{
Geometry
buildingGeom
=
building
.
getGeometry
(
GeometryType
.
SOLID
,
Lod
.
LOD2
);
buildingGeom
.
clearCheckResults
();
SolidSelfIntCheck
check
=
new
SolidSelfIntCheck
();
check
.
check
(
buildingGeom
);
CheckResult
cr
=
buildingGeom
.
getCheckResult
(
check
);
assertNotNull
(
cr
);
//Ensure that the found error is not a self-intersection error
assertEquals
(
"Known False-Positive self-intersection was detected as error"
,
ResultStatus
.
OK
,
cr
.
getResultStatus
());
}
}
@Test
public
void
testKnownFalsePositiveExample_BigMesh1
()
throws
CityGmlParseException
,
InvalidGmlFileException
{
testFalsePositiveExample
(
"src/test/resources/SolidSelfIntTest-known_false_positive_Big_Mesh1.gml"
);
}
@Test
public
void
testKnownFalsePositiveExample_BigMesh2
()
throws
CityGmlParseException
,
InvalidGmlFileException
{
testFalsePositiveExample
(
"src/test/resources/SolidSelfIntTest-known_false_positive_Big_Mesh2.gml"
);
}
}
CityDoctorParent/pom.xml
View file @
f9f4046f
...
...
@@ -35,6 +35,9 @@
<version>
2.22.0
</version>
<configuration>
<testFailureIgnore>
false
</testFailureIgnore>
<excludes>
<exclude>
**/SolidSelfIntCheckFalsePositiveBigMeshTest.java
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
...
...
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