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
cec0e9d5
Commit
cec0e9d5
authored
May 25, 2026
by
Numanoglu
Browse files
WIP boxes with non planar faces for sweep tests
parent
68aab3c9
Changes
7
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/test.gml
0 → 100644
View file @
cec0e9d5
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<core:CityModel
xmlns:xAL=
"urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"
xmlns:gml=
"http://www.opengis.net/gml"
xmlns:wtr=
"http://www.opengis.net/citygml/waterbody/2.0"
xmlns:app=
"http://www.opengis.net/citygml/appearance/2.0"
xmlns:core=
"http://www.opengis.net/citygml/2.0"
xmlns:veg=
"http://www.opengis.net/citygml/vegetation/2.0"
xmlns:dem=
"http://www.opengis.net/citygml/relief/2.0"
xmlns:tran=
"http://www.opengis.net/citygml/transportation/2.0"
xmlns:bldg=
"http://www.opengis.net/citygml/building/2.0"
xmlns:grp=
"http://www.opengis.net/citygml/cityobjectgroup/2.0"
xmlns:tun=
"http://www.opengis.net/citygml/tunnel/2.0"
xmlns:qual=
"https://transfer.hft-stuttgart.de/pages/citydoctor/qualityade/1.0.0"
xmlns:frn=
"http://www.opengis.net/citygml/cityfurniture/2.0"
xmlns:brid=
"http://www.opengis.net/citygml/bridge/2.0"
xmlns:gen=
"http://www.opengis.net/citygml/generics/2.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:luse=
"http://www.opengis.net/citygml/landuse/2.0"
xsi:schemaLocation=
"http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/cityobjectgroup/2.0 http://schemas.opengis.net/citygml/cityobjectgroup/2.0/cityObjectGroup.xsd http://www.opengis.net/citygml/tunnel/2.0 http://schemas.opengis.net/citygml/tunnel/2.0/tunnel.xsd http://www.opengis.net/citygml/waterbody/2.0 http://schemas.opengis.net/citygml/waterbody/2.0/waterBody.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/cityfurniture/2.0 http://schemas.opengis.net/citygml/cityfurniture/2.0/cityFurniture.xsd http://www.opengis.net/citygml/bridge/2.0 http://schemas.opengis.net/citygml/bridge/2.0/bridge.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd http://www.opengis.net/citygml/vegetation/2.0 http://schemas.opengis.net/citygml/vegetation/2.0/vegetation.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/transportation/2.0 http://schemas.opengis.net/citygml/transportation/2.0/transportation.xsd http://www.opengis.net/citygml/landuse/2.0 http://schemas.opengis.net/citygml/landuse/2.0/landUse.xsd"
>
<core:cityObjectMember>
<bldg:Building>
<bldg:lod1Solid>
<gml:Solid
gml:id=
"CityDoctor_1777401150754_13"
>
<gml:exterior>
<gml:CompositeSurface>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1777401150753_2"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1777401150752_1"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 10.0 0.0 0.0 10.0 10.0 0.0 0.0 10.0 0.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1777401150753_4"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1777401150753_3"
>
<gml:posList
srsDimension=
"3"
>
10.0 0.0 0.0 10.0 0.0 10.0 10.0 10.0 10.0 10.0 10.0 0.0 10.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1777401150753_6"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1777401150753_5"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 10.0 0.0 10.0 10.0 10.0 10.0 10.0 10.0 0.0 10.0 0.0 0.0 10.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1777401150753_8"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1777401150753_7"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 0.0 10.0 0.0 0.0 10.0 10.0 0.0 0.0 10.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1777401150754_10"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1777401150753_9"
>
<gml:posList
srsDimension=
"3"
>
0.0 10.0 0.0 10.0 10.0 0.0 10.0 10.0 10.0 0.0 10.0 10.0 0.0 10.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1777401150754_12"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1777401150754_11"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 0.0 0.0 10.0 10.0 0.0 10.0 10.0 0.0 0.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:CompositeSurface>
</gml:exterior>
</gml:Solid>
</bldg:lod1Solid>
</bldg:Building>
</core:cityObjectMember>
</core:CityModel>
\ No newline at end of file
CityDoctorParent/Extensions/CityDoctorHealer/output-non-planar-sweep-box.gml
0 → 100644
View file @
cec0e9d5
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<core:CityModel
xmlns:xAL=
"urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"
xmlns:gml=
"http://www.opengis.net/gml"
xmlns:wtr=
"http://www.opengis.net/citygml/waterbody/2.0"
xmlns:app=
"http://www.opengis.net/citygml/appearance/2.0"
xmlns:core=
"http://www.opengis.net/citygml/2.0"
xmlns:veg=
"http://www.opengis.net/citygml/vegetation/2.0"
xmlns:dem=
"http://www.opengis.net/citygml/relief/2.0"
xmlns:tran=
"http://www.opengis.net/citygml/transportation/2.0"
xmlns:bldg=
"http://www.opengis.net/citygml/building/2.0"
xmlns:grp=
"http://www.opengis.net/citygml/cityobjectgroup/2.0"
xmlns:tun=
"http://www.opengis.net/citygml/tunnel/2.0"
xmlns:qual=
"https://transfer.hft-stuttgart.de/pages/citydoctor/qualityade/1.0.0"
xmlns:frn=
"http://www.opengis.net/citygml/cityfurniture/2.0"
xmlns:brid=
"http://www.opengis.net/citygml/bridge/2.0"
xmlns:gen=
"http://www.opengis.net/citygml/generics/2.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:luse=
"http://www.opengis.net/citygml/landuse/2.0"
xsi:schemaLocation=
"http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/cityobjectgroup/2.0 http://schemas.opengis.net/citygml/cityobjectgroup/2.0/cityObjectGroup.xsd http://www.opengis.net/citygml/tunnel/2.0 http://schemas.opengis.net/citygml/tunnel/2.0/tunnel.xsd http://www.opengis.net/citygml/waterbody/2.0 http://schemas.opengis.net/citygml/waterbody/2.0/waterBody.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/cityfurniture/2.0 http://schemas.opengis.net/citygml/cityfurniture/2.0/cityFurniture.xsd http://www.opengis.net/citygml/bridge/2.0 http://schemas.opengis.net/citygml/bridge/2.0/bridge.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd http://www.opengis.net/citygml/vegetation/2.0 http://schemas.opengis.net/citygml/vegetation/2.0/vegetation.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/transportation/2.0 http://schemas.opengis.net/citygml/transportation/2.0/transportation.xsd http://www.opengis.net/citygml/landuse/2.0 http://schemas.opengis.net/citygml/landuse/2.0/landUse.xsd"
>
<core:cityObjectMember>
<bldg:Building
gml:id=
"SyntheticSweepPlanarityRaisedCorner"
>
<bldg:lod2Solid>
<gml:Solid
gml:id=
"CityDoctor_1779439879433_27"
>
<gml:exterior>
<gml:CompositeSurface>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779439879432_16"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779439879432_15"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 4.0 0.0 0.0 4.0 4.0 1.0 0.0 4.0 0.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779439879433_18"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779439879432_17"
>
<gml:posList
srsDimension=
"3"
>
4.0 0.0 0.0 4.0 0.0 4.0 4.0 4.0 4.0 4.0 4.0 1.0 4.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779439879433_20"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779439879433_19"
>
<gml:posList
srsDimension=
"3"
>
4.0 0.0 4.0 0.0 0.0 5.0 0.0 4.0 4.0 4.0 4.0 4.0 4.0 0.0 4.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779439879433_22"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779439879433_21"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 0.0 4.0 0.0 0.0 4.0 4.0 0.0 0.0 5.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779439879433_24"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779439879433_23"
>
<gml:posList
srsDimension=
"3"
>
4.0 4.0 1.0 4.0 4.0 4.0 0.0 4.0 4.0 0.0 4.0 0.0 4.0 4.0 1.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779439879433_26"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779439879433_25"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 0.0 0.0 5.0 4.0 0.0 4.0 4.0 0.0 0.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:CompositeSurface>
</gml:exterior>
</gml:Solid>
</bldg:lod2Solid>
</bldg:Building>
</core:cityObjectMember>
</core:CityModel>
\ No newline at end of file
CityDoctorParent/Extensions/CityDoctorHealer/output.gml
0 → 100644
View file @
cec0e9d5
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<core:CityModel
xmlns:xAL=
"urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"
xmlns:gml=
"http://www.opengis.net/gml"
xmlns:wtr=
"http://www.opengis.net/citygml/waterbody/2.0"
xmlns:app=
"http://www.opengis.net/citygml/appearance/2.0"
xmlns:core=
"http://www.opengis.net/citygml/2.0"
xmlns:veg=
"http://www.opengis.net/citygml/vegetation/2.0"
xmlns:dem=
"http://www.opengis.net/citygml/relief/2.0"
xmlns:tran=
"http://www.opengis.net/citygml/transportation/2.0"
xmlns:bldg=
"http://www.opengis.net/citygml/building/2.0"
xmlns:grp=
"http://www.opengis.net/citygml/cityobjectgroup/2.0"
xmlns:tun=
"http://www.opengis.net/citygml/tunnel/2.0"
xmlns:qual=
"https://transfer.hft-stuttgart.de/pages/citydoctor/qualityade/1.0.0"
xmlns:frn=
"http://www.opengis.net/citygml/cityfurniture/2.0"
xmlns:brid=
"http://www.opengis.net/citygml/bridge/2.0"
xmlns:gen=
"http://www.opengis.net/citygml/generics/2.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:luse=
"http://www.opengis.net/citygml/landuse/2.0"
xsi:schemaLocation=
"http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/cityobjectgroup/2.0 http://schemas.opengis.net/citygml/cityobjectgroup/2.0/cityObjectGroup.xsd http://www.opengis.net/citygml/tunnel/2.0 http://schemas.opengis.net/citygml/tunnel/2.0/tunnel.xsd http://www.opengis.net/citygml/waterbody/2.0 http://schemas.opengis.net/citygml/waterbody/2.0/waterBody.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/cityfurniture/2.0 http://schemas.opengis.net/citygml/cityfurniture/2.0/cityFurniture.xsd http://www.opengis.net/citygml/bridge/2.0 http://schemas.opengis.net/citygml/bridge/2.0/bridge.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd http://www.opengis.net/citygml/vegetation/2.0 http://schemas.opengis.net/citygml/vegetation/2.0/vegetation.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/transportation/2.0 http://schemas.opengis.net/citygml/transportation/2.0/transportation.xsd http://www.opengis.net/citygml/landuse/2.0 http://schemas.opengis.net/citygml/landuse/2.0/landUse.xsd"
>
<core:cityObjectMember>
<bldg:Building
gml:id=
"SyntheticSweepPlanarityRaisedCorner"
>
<bldg:lod2Solid>
<gml:Solid
gml:id=
"CityDoctor_1779439879397_13"
>
<gml:exterior>
<gml:CompositeSurface>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779439879395_2"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779439879393_1"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 0.0 4.0 0.0 4.0 4.0 0.0 4.0 0.0 0.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779439879396_4"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779439879396_3"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 4.0 0.0 0.0 4.0 0.0 4.0 0.0 0.0 4.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779439879396_6"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779439879396_5"
>
<gml:posList
srsDimension=
"3"
>
4.0 0.0 0.0 4.0 4.0 0.0 4.0 4.0 5.0 4.0 0.0 4.0 4.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779439879396_8"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779439879396_7"
>
<gml:posList
srsDimension=
"3"
>
4.0 4.0 0.0 0.0 4.0 0.0 0.0 4.0 4.0 4.0 4.0 5.0 4.0 4.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779439879396_10"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779439879396_9"
>
<gml:posList
srsDimension=
"3"
>
0.0 4.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0 0.0 4.0 4.0 0.0 4.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779439879396_12"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779439879396_11"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 4.0 4.0 0.0 4.0 4.0 4.0 5.0 0.0 4.0 4.0 0.0 0.0 4.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:CompositeSurface>
</gml:exterior>
</gml:Solid>
</bldg:lod2Solid>
</bldg:Building>
</core:cityObjectMember>
</core:CityModel>
\ No newline at end of file
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealPlanarPolygonErrorTest.java
View file @
cec0e9d5
...
...
@@ -38,6 +38,7 @@ public class HealPlanarPolygonErrorTest {
@Test
public
void
testPlanarPlaneDistance
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
// Model with a non planar wall on the east side
String
path
=
"src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0002-T0001.gml"
;
ValidationConfiguration
config
=
ValidationConfiguration
.
loadStandardValidationConfig
();
CityDoctorModel
model
=
TestUtil
.
loadCityModel
(
path
,
config
);
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/SyntheticSweepPlanarityModelTest.java
0 → 100644
View file @
cec0e9d5
package
de.hft.stuttgart.citydoctor2.healing
;
import
java.io.File
;
import
org.citygml4j.core.model.CityGMLVersion
;
import
org.citygml4j.core.model.core.CityModel
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.checks.geometry.PlanarCheck
;
import
de.hft.stuttgart.citydoctor2.database.UnconnectedCache
;
import
de.hft.stuttgart.citydoctor2.datastructure.Building
;
import
de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel
;
import
de.hft.stuttgart.citydoctor2.datastructure.ConcretePolygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation
;
import
de.hft.stuttgart.citydoctor2.datastructure.GeometryType
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType
;
import
de.hft.stuttgart.citydoctor2.datastructure.Lod
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vertex
;
import
de.hft.stuttgart.citydoctor2.exceptions.CityDoctorWriteException
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
public
class
SyntheticSweepPlanarityModelTest
{
public
static
void
main
(
String
[]
args
)
throws
CityDoctorWriteException
{
exportBuildingForGui
(
createSweepPlanarityCubeWithRaisedTopCorner
(),
new
File
(
"sweep-planarity-raised-top-corner.gml"
));
exportBuildingForGui
(
createNonPlanarSweepBox
(),
new
File
(
"sweep-planarity-existing-healer-test-model.gml"
));
}
@Test
public
void
testSyntheticSweepPlanarityCubeHasNonPlanarTopFace
()
{
Building
building
=
createSweepPlanarityCubeWithRaisedTopCorner
();
Geometry
geom
=
building
.
getGeometries
().
get
(
0
);
PlanarCheck
check
=
new
PlanarCheck
();
geom
.
accept
(
check
);
check
.
check
(
geom
);
Assert
.
assertTrue
(
geom
.
containsError
(
CheckId
.
C_GE_P_NON_PLANAR
));
}
@Test
public
void
exportSyntheticSweepPlanarityCubeForGui
()
throws
CityDoctorWriteException
{
exportBuildingForGui
(
createSweepPlanarityCubeWithRaisedTopCorner
(),
new
File
(
"sweep-planarity-raised-top-corner.gml"
));
}
@Test
public
void
exportNonPlanarSweepBoxForGui
()
throws
CityDoctorWriteException
{
exportBuildingForGui
(
createNonPlanarSweepBox
(),
new
File
(
"sweep-planarity-existing-healer-test-model.gml"
));
}
static
Building
createSweepPlanarityCubeWithRaisedTopCorner
()
{
Building
building
=
new
Building
();
Geometry
geom
=
new
Geometry
(
GeometryType
.
SOLID
,
Lod
.
LOD2
,
Orientation
.
OUTWARD
);
building
.
addGeometry
(
geom
);
Vertex
v000
=
new
Vertex
(
0
,
0
,
0
);
Vertex
v400
=
new
Vertex
(
4
,
0
,
0
);
Vertex
v440
=
new
Vertex
(
4
,
4
,
0
);
Vertex
v040
=
new
Vertex
(
0
,
4
,
0
);
Vertex
v004
=
new
Vertex
(
0
,
0
,
4
);
Vertex
v404
=
new
Vertex
(
4
,
0
,
4
);
Vertex
p1
=
new
Vertex
(
4
,
4
,
5
);
Vertex
v044
=
new
Vertex
(
0
,
4
,
4
);
addPolygon
(
geom
,
v000
,
v040
,
v440
,
v400
);
// bottom, z = 0
addPolygon
(
geom
,
v000
,
v400
,
v404
,
v004
);
// front, y = 0
addPolygon
(
geom
,
v400
,
v440
,
p1
,
v404
);
// right, x = 4
addPolygon
(
geom
,
v440
,
v040
,
v044
,
p1
);
// back, y = 4
addPolygon
(
geom
,
v040
,
v000
,
v004
,
v044
);
// left, x = 0
addPolygon
(
geom
,
v004
,
v404
,
p1
,
v044
);
// top, P1 lifted: not planar
geom
.
updateEdgesAndVertices
();
return
building
;
}
static
Building
createNonPlanarSweepBox
()
{
Building
building
=
new
Building
();
Geometry
geom
=
new
Geometry
(
GeometryType
.
SOLID
,
Lod
.
LOD2
,
Orientation
.
OUTWARD
);
building
.
addGeometry
(
geom
);
Vertex
v0
=
new
Vertex
(
0
,
0
,
0
);
Vertex
v1
=
new
Vertex
(
4
,
0
,
0
);
Vertex
v4
=
new
Vertex
(
4
,
4
,
1
);
Vertex
v6
=
new
Vertex
(
0
,
4
,
0
);
Vertex
v8
=
new
Vertex
(
4
,
0
,
4
);
Vertex
v9
=
new
Vertex
(
4
,
4
,
4
);
Vertex
v10
=
new
Vertex
(
0
,
4
,
4
);
Vertex
v11
=
new
Vertex
(
0
,
0
,
5
);
addPolygon
(
geom
,
v0
,
v1
,
v4
,
v6
);
// z = 0, but v4 is lifted
addPolygon
(
geom
,
v1
,
v8
,
v9
,
v4
);
// x = 4
addPolygon
(
geom
,
v8
,
v11
,
v10
,
v9
);
// z = 4, but v11 is lifted
addPolygon
(
geom
,
v0
,
v6
,
v10
,
v11
);
// x = 0
addPolygon
(
geom
,
v4
,
v9
,
v10
,
v6
);
// y = 4
addPolygon
(
geom
,
v0
,
v11
,
v8
,
v1
);
// y = 0
geom
.
updateEdgesAndVertices
();
return
building
;
}
private
static
CityDoctorModel
createCityDoctorModel
(
Building
building
,
File
sourceFile
)
{
ParserConfiguration
config
=
new
ParserConfiguration
(
8
,
false
);
CityDoctorModel
model
=
new
CityDoctorModel
(
config
,
sourceFile
,
new
UnconnectedCache
());
model
.
setParsedCityGMLVersion
(
CityGMLVersion
.
v2_0
);
model
.
setCityModel
(
new
CityModel
());
org
.
citygml4j
.
core
.
model
.
building
.
Building
gmlBuilding
=
new
org
.
citygml4j
.
core
.
model
.
building
.
Building
();
gmlBuilding
.
setId
(
"SyntheticSweepPlanarityRaisedCorner"
);
building
.
setGmlObject
(
gmlBuilding
);
model
.
addBuilding
(
building
);
return
model
;
}
private
static
void
exportBuildingForGui
(
Building
building
,
File
output
)
throws
CityDoctorWriteException
{
CityDoctorModel
model
=
createCityDoctorModel
(
building
,
output
);
model
.
saveAs
(
output
.
getAbsolutePath
(),
false
);
System
.
out
.
println
(
"Open in CityDoctor GUI:"
);
System
.
out
.
println
(
output
.
getAbsolutePath
());
}
private
static
Polygon
addPolygon
(
Geometry
geom
,
Vertex
...
vertices
)
{
Polygon
polygon
=
new
ConcretePolygon
();
geom
.
addPolygon
(
polygon
);
LinearRing
ring
=
new
LinearRing
(
LinearRingType
.
EXTERIOR
);
polygon
.
setExteriorRing
(
ring
);
for
(
Vertex
vertex
:
vertices
)
{
ring
.
addVertex
(
vertex
);
}
ring
.
addVertex
(
vertices
[
0
]);
return
polygon
;
}
}
CityDoctorParent/Extensions/CityDoctorHealer/sweep-planarity-existing-healer-test-model.gml
0 → 100644
View file @
cec0e9d5
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<core:CityModel
xmlns:xAL=
"urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"
xmlns:gml=
"http://www.opengis.net/gml"
xmlns:wtr=
"http://www.opengis.net/citygml/waterbody/2.0"
xmlns:app=
"http://www.opengis.net/citygml/appearance/2.0"
xmlns:core=
"http://www.opengis.net/citygml/2.0"
xmlns:veg=
"http://www.opengis.net/citygml/vegetation/2.0"
xmlns:dem=
"http://www.opengis.net/citygml/relief/2.0"
xmlns:tran=
"http://www.opengis.net/citygml/transportation/2.0"
xmlns:bldg=
"http://www.opengis.net/citygml/building/2.0"
xmlns:grp=
"http://www.opengis.net/citygml/cityobjectgroup/2.0"
xmlns:tun=
"http://www.opengis.net/citygml/tunnel/2.0"
xmlns:qual=
"https://transfer.hft-stuttgart.de/pages/citydoctor/qualityade/1.0.0"
xmlns:frn=
"http://www.opengis.net/citygml/cityfurniture/2.0"
xmlns:brid=
"http://www.opengis.net/citygml/bridge/2.0"
xmlns:gen=
"http://www.opengis.net/citygml/generics/2.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:luse=
"http://www.opengis.net/citygml/landuse/2.0"
xsi:schemaLocation=
"http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/cityobjectgroup/2.0 http://schemas.opengis.net/citygml/cityobjectgroup/2.0/cityObjectGroup.xsd http://www.opengis.net/citygml/tunnel/2.0 http://schemas.opengis.net/citygml/tunnel/2.0/tunnel.xsd http://www.opengis.net/citygml/waterbody/2.0 http://schemas.opengis.net/citygml/waterbody/2.0/waterBody.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/cityfurniture/2.0 http://schemas.opengis.net/citygml/cityfurniture/2.0/cityFurniture.xsd http://www.opengis.net/citygml/bridge/2.0 http://schemas.opengis.net/citygml/bridge/2.0/bridge.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd http://www.opengis.net/citygml/vegetation/2.0 http://schemas.opengis.net/citygml/vegetation/2.0/vegetation.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/transportation/2.0 http://schemas.opengis.net/citygml/transportation/2.0/transportation.xsd http://www.opengis.net/citygml/landuse/2.0 http://schemas.opengis.net/citygml/landuse/2.0/landUse.xsd"
>
<core:cityObjectMember>
<bldg:Building
gml:id=
"SyntheticSweepPlanarityRaisedCorner"
>
<bldg:lod2Solid>
<gml:Solid
gml:id=
"CityDoctor_1779445543214_27"
>
<gml:exterior>
<gml:CompositeSurface>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779445543213_16"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779445543213_15"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 4.0 0.0 0.0 4.0 4.0 1.0 0.0 4.0 0.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779445543213_18"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779445543213_17"
>
<gml:posList
srsDimension=
"3"
>
4.0 0.0 0.0 4.0 0.0 4.0 4.0 4.0 4.0 4.0 4.0 1.0 4.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779445543213_20"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779445543213_19"
>
<gml:posList
srsDimension=
"3"
>
4.0 0.0 4.0 0.0 0.0 5.0 0.0 4.0 4.0 4.0 4.0 4.0 4.0 0.0 4.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779445543213_22"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779445543213_21"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 0.0 4.0 0.0 0.0 4.0 4.0 0.0 0.0 5.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779445543213_24"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779445543213_23"
>
<gml:posList
srsDimension=
"3"
>
4.0 4.0 1.0 4.0 4.0 4.0 0.0 4.0 4.0 0.0 4.0 0.0 4.0 4.0 1.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779445543214_26"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779445543214_25"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 0.0 0.0 5.0 4.0 0.0 4.0 4.0 0.0 0.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:CompositeSurface>
</gml:exterior>
</gml:Solid>
</bldg:lod2Solid>
</bldg:Building>
</core:cityObjectMember>
</core:CityModel>
\ No newline at end of file
CityDoctorParent/Extensions/CityDoctorHealer/sweep-planarity-raised-top-corner.gml
0 → 100644
View file @
cec0e9d5
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<core:CityModel
xmlns:xAL=
"urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"
xmlns:gml=
"http://www.opengis.net/gml"
xmlns:wtr=
"http://www.opengis.net/citygml/waterbody/2.0"
xmlns:app=
"http://www.opengis.net/citygml/appearance/2.0"
xmlns:core=
"http://www.opengis.net/citygml/2.0"
xmlns:veg=
"http://www.opengis.net/citygml/vegetation/2.0"
xmlns:dem=
"http://www.opengis.net/citygml/relief/2.0"
xmlns:tran=
"http://www.opengis.net/citygml/transportation/2.0"
xmlns:bldg=
"http://www.opengis.net/citygml/building/2.0"
xmlns:grp=
"http://www.opengis.net/citygml/cityobjectgroup/2.0"
xmlns:tun=
"http://www.opengis.net/citygml/tunnel/2.0"
xmlns:qual=
"https://transfer.hft-stuttgart.de/pages/citydoctor/qualityade/1.0.0"
xmlns:frn=
"http://www.opengis.net/citygml/cityfurniture/2.0"
xmlns:brid=
"http://www.opengis.net/citygml/bridge/2.0"
xmlns:gen=
"http://www.opengis.net/citygml/generics/2.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:luse=
"http://www.opengis.net/citygml/landuse/2.0"
xsi:schemaLocation=
"http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/cityobjectgroup/2.0 http://schemas.opengis.net/citygml/cityobjectgroup/2.0/cityObjectGroup.xsd http://www.opengis.net/citygml/tunnel/2.0 http://schemas.opengis.net/citygml/tunnel/2.0/tunnel.xsd http://www.opengis.net/citygml/waterbody/2.0 http://schemas.opengis.net/citygml/waterbody/2.0/waterBody.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/cityfurniture/2.0 http://schemas.opengis.net/citygml/cityfurniture/2.0/cityFurniture.xsd http://www.opengis.net/citygml/bridge/2.0 http://schemas.opengis.net/citygml/bridge/2.0/bridge.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd http://www.opengis.net/citygml/vegetation/2.0 http://schemas.opengis.net/citygml/vegetation/2.0/vegetation.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/transportation/2.0 http://schemas.opengis.net/citygml/transportation/2.0/transportation.xsd http://www.opengis.net/citygml/landuse/2.0 http://schemas.opengis.net/citygml/landuse/2.0/landUse.xsd"
>
<core:cityObjectMember>
<bldg:Building
gml:id=
"SyntheticSweepPlanarityRaisedCorner"
>
<bldg:lod2Solid>
<gml:Solid
gml:id=
"CityDoctor_1779445543182_13"
>
<gml:exterior>
<gml:CompositeSurface>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779445543180_2"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779445543180_1"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 0.0 4.0 0.0 4.0 4.0 0.0 4.0 0.0 0.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779445543182_4"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779445543181_3"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 0.0 4.0 0.0 0.0 4.0 0.0 4.0 0.0 0.0 4.0 0.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779445543182_6"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779445543182_5"
>
<gml:posList
srsDimension=
"3"
>
4.0 0.0 0.0 4.0 4.0 0.0 4.0 4.0 5.0 4.0 0.0 4.0 4.0 0.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779445543182_8"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779445543182_7"
>
<gml:posList
srsDimension=
"3"
>
4.0 4.0 0.0 0.0 4.0 0.0 0.0 4.0 4.0 4.0 4.0 5.0 4.0 4.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779445543182_10"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779445543182_9"
>
<gml:posList
srsDimension=
"3"
>
0.0 4.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0 0.0 4.0 4.0 0.0 4.0 0.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon
gml:id=
"CityDoctor_1779445543182_12"
>
<gml:exterior>
<gml:LinearRing
gml:id=
"CityDoctor_1779445543182_11"
>
<gml:posList
srsDimension=
"3"
>
0.0 0.0 4.0 4.0 0.0 4.0 4.0 4.0 5.0 0.0 4.0 4.0 0.0 0.0 4.0
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:CompositeSurface>
</gml:exterior>
</gml:Solid>
</bldg:lod2Solid>
</bldg:Building>
</core:cityObjectMember>
</core:CityModel>
\ No newline at end of file
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