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
742b7875
Commit
742b7875
authored
Dec 03, 2020
by
Matthias Betz
Browse files
fixed schematron tests, with new schematron format
parent
1bc2d658
Pipeline
#1605
passed with stage
in 1 minute and 51 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/BoundingBoxCalculator.java
View file @
742b7875
...
...
@@ -116,7 +116,7 @@ public class BoundingBoxCalculator {
private
static
void
findMinMax
(
Vector3d
low
,
Vector3d
high
,
CityObject
co
)
{
for
(
Geometry
geom
:
co
.
getGeometries
())
{
if
(
geom
.
getVertices
()
==
null
)
{
continue
;
geom
.
updateVertices
()
;
}
for
(
Vertex
v
:
geom
.
getVertices
())
{
if
(
v
.
getX
()
<
low
.
getX
())
{
...
...
CityDoctorParent/CityDoctorValidation/src/test/resources/schematronTest.xml
View file @
742b7875
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns=
"http://purl.oclc.org/dsdl/schematron"
queryBinding=
"xslt2"
>
<!-- semantic requirements SimStadt monthly energy balance -->
<ns
prefix=
"gml"
uri=
"http://www.opengis.net/gml"
/>
<ns
prefix=
"bldg"
uri=
"http://www.opengis.net/citygml/building/2.0"
/>
<pattern>
<rule
context=
"//Building | //bldg:Building"
>
<assert
test=
"@gml:id | @id"
>
Attribute gml:id is missing in one building.
</assert>
<assert
test=
"count(lod1Solid) = 1"
><value-of
select=
"@gml:id | @id"
/>
: SE_MISSING_ELEMENT lod1Solid
</assert>
<assert
test=
"count(yearOfConstruction) >= 1"
><value-of
select=
"@gml:id | @id"
/>
: SE_MISSING_ELEMENT yearOfConstruction
</assert>
<assert
test=
"count(function) = 1"
><value-of
select=
"@gml:id | @id"
/>
: SE_MISSING_ELEMENT function
</assert>
</rule>
<rule
context=
"//BuildingPart | //bldg:BuildingPart"
>
<assert
test=
"@gml:id | @id"
><value-of
select=
"@gml:id | @id"
/>
: Attribute gml:id is missing in one building part.
</assert>
<assert
test=
"count(lod1Solid) = 1"
><value-of
select=
"@gml:id | @id"
/>
: SE_MISSING_ELEMENT lod1Solid
</assert>
<rule
context=
"//*:Building"
>
<assert
test=
"count(*:lod2Solid) = 1"
><value-of
select=
"@gml:id | @id"
/>
||||SEM_ATTRIBUTE_MISSING||lod1Solid||false
</assert>
<assert
test=
"count(*:yearOfConstruction) >= 1"
><value-of
select=
"@gml:id | @id"
/>
||||SEM_ATTRIBUTE_MISSING||yearOfConstruction||false
</assert>
<assert
test=
"count(*:function) = 1"
><value-of
select=
"@gml:id | @id"
/>
||||SEM_ATTRIBUTE_MISSING||function||false
</assert>
<assert
test=
"*:doubleAttribute[@name = 'Volume'] > 0 and *:doubleAttribute[@name = 'Volume'] < 5000"
><value-of
select=
"@gml:id | @id"
/>
||||SEM_ATTRIBUTE_WRONG_VALUE||volume||true
</assert>
</rule>
<rule
context=
"//*:Building//*:RoofSurface"
>
<assert
test=
"count(function) = 1"
><value-of
select=
"ancestor::*:Building/@*:id"
/>
||
<value-of
select=
"@gml:id | @id"
/>
||SEM_ATTRIBUTE_MISSING||function||false
</assert>
</rule>
</pattern>
</schema>
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