Commit 5d40c7b6 authored by Matthias Betz's avatar Matthias Betz
Browse files

CityDoctor2 validation open source release

parents
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.ErrorId;
import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class InteriorDisconnectedSystemTest {
@Test
public void testInteriorDisconnected1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0001-T0002.gml");
for (Polygon p : c.getBuildings().get(0).getGeometries().get(0).getPolygons()) {
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_INTERIOR_DISCONNECTED);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
}
@Test
public void testInteriorDisconnected2() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0003-T0001.gml");
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.2", c);
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_INTERIOR_DISCONNECTED);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_P_INTERIOR_DISCONNECTED, cr.getError().getErrorId());
}
@Test
public void testInteriorDisconnected3() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0003-T0002.gml");
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.2", c);
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_INTERIOR_DISCONNECTED);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_P_INTERIOR_DISCONNECTED, cr.getError().getErrorId());
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.ErrorId;
import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class MultipleComponentTest {
@Test
public void testNoMultipleComponents() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_MULTIPLE_CONNECTED_COMPONENTS);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
@Test
public void testMultipleComponents() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0005-T0001.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_MULTIPLE_CONNECTED_COMPONENTS);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_S_MULTIPLE_CONNECTED_COMPONENTS, cr.getError().getErrorId());
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.ErrorId;
import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class NonManifoldEdgeSystemTest {
@Test
public void testNonManifoldEdge1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NON_MANIFOLD_EDGE);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
@Test
public void testNonManifoldEdge2() throws CityGmlParseException, IOException, InvalidGmlFileException {
Map<CheckId, Map<String, String>> paramMap = new EnumMap<>(CheckId.class);
Map<String, String> parameter = new HashMap<>();
parameter.put("distanceTolerance", "0.1");
paramMap.put(CheckId.C_GE_P_NON_PLANAR, parameter);
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0004-T0001.gml",
paramMap);
Geometry g = c.getBuildings().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NON_MANIFOLD_EDGE);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_S_NON_MANIFOLD_EDGE, cr.getError().getErrorId());
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.ErrorId;
import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class NonManifoldVertexSystemTest {
@Test
public void testNonManifoldVertex1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NON_MANIFOLD_VERTEX);
System.out.println(cr);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
@Test
public void testNonManifoldVertex2() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0003-T0001.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NON_MANIFOLD_VERTEX);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_S_NON_MANIFOLD_VERTEX, cr.getError().getErrorId());
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.Checker;
import de.hft.stuttgart.citydoctor2.check.ErrorId;
import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.LinearRing;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParser;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class NumPointsCheckTest {
@Test
public void testNumPoints1() throws CityGmlParseException, IOException, InvalidGmlFileException {
ParserConfiguration config = new ParserConfiguration(8, false);
CityDoctorModel m = CityGmlParser.parseCityGmlFile("src/test/resources/QA-Ex-C-LR-1.gml", config);
Checker c = new Checker(m);
c.runChecks();
LinearRing r1 = TestUtil.getPolygonById("p_r_1", m).getExteriorRing();
CheckResult cr1 = r1.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS);
assertEquals(ResultStatus.ERROR, cr1.getResultStatus());
assertEquals(ErrorId.GE_R_TOO_FEW_POINTS, cr1.getError().getErrorId());
LinearRing r2 = TestUtil.getPolygonById("p_w_4", m).getExteriorRing();
assertEquals(ResultStatus.OK, r2.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS).getResultStatus());
}
@Test
public void testNumPoints2() throws CityGmlParseException, IOException, InvalidGmlFileException {
ParserConfiguration config = new ParserConfiguration(8, false);
CityDoctorModel m = CityGmlParser.parseCityGmlFile("src/test/resources/QA-Ex-C-LR-1GK.gml", config);
Checker c = new Checker(m);
c.runChecks();
LinearRing r1 = TestUtil.getPolygonById("p_r_1", m).getExteriorRing();
CheckResult cr1 = r1.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS);
assertEquals(ResultStatus.ERROR, cr1.getResultStatus());
assertEquals(ErrorId.GE_R_TOO_FEW_POINTS, cr1.getError().getErrorId());
LinearRing r2 = TestUtil.getPolygonById("p_w_4", m).getExteriorRing();
assertEquals(ResultStatus.OK, r2.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS).getResultStatus());
}
@Test
public void testNumPoints3() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
for (Polygon p : c.getBuildings().get(0).getGeometries().get(0).getPolygons()) {
LinearRing r = p.getExteriorRing();
assertEquals(ResultStatus.OK, r.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS).getResultStatus());
}
}
@Test
public void testNumPoints4() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-LR-0001-T0001.gml");
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.6", c);
LinearRing r = p.getExteriorRing();
assertEquals(ResultStatus.ERROR, r.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS).getResultStatus());
}
@Test
public void testNumPoints5() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-LR-0001-T0002.gml");
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.6", c);
LinearRing r = p.getExteriorRing();
assertEquals(ResultStatus.DEPENDENCIES_NOT_MET,
r.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS).getResultStatus());
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.ErrorId;
import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class OrientationSameSystemTest {
@Test
public void testOrientationSame1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0001-T0002.gml");
for (Polygon p : c.getBuildings().get(0).getGeometries().get(0).getPolygons()) {
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_ORIENTATION_RINGS_SAME);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
}
@Test
public void testOrientationSame2() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0006-T0001.gml");
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.2", c);
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_ORIENTATION_RINGS_SAME);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_P_ORIENTATION_RINGS_SAME, cr.getError().getErrorId());
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
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.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.Edge;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParser;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class OuterEdgeCheckTest {
@Before
public void setup() {
// clear interrupt flag
Thread.interrupted();
}
@Test()
public void testOuterEdge1() throws CityGmlParseException, IOException, InvalidGmlFileException {
ParserConfiguration config = new ParserConfiguration(8, false);
CityDoctorModel m = CityGmlParser.parseCityGmlFile("src/test/resources/QA-CS-OUTEREDGE.gml", config);
Checker c = new Checker(m);
c.runChecks();
ArrayList<Vertex> expectedErrorEdges = new ArrayList<Vertex>();
expectedErrorEdges.add(new Vertex(2.0, 0.0, 3.0));
expectedErrorEdges.add(new Vertex(2.0, 0.0, 0.0));
expectedErrorEdges.add(new Vertex(0.0, 0.0, 0.0));
expectedErrorEdges.add(new Vertex(0.0, 0.0, 3.0));
expectedErrorEdges.add(new Vertex(2.0, 0.0, 0.0));
expectedErrorEdges.add(new Vertex(0.0, 0.0, 0.0));
expectedErrorEdges.add(new Vertex(0.0, 0.0, 3.0));
expectedErrorEdges.add(new Vertex(1.0, 0.0, 3.5));
expectedErrorEdges.add(new Vertex(1.0, 0.0, 3.5));
expectedErrorEdges.add(new Vertex(2.0, 0.0, 3.0));
Geometry geom = m.getBuildings().get(0).getGeometries().get(0);
CheckResult cr = geom.getCheckResult(CheckId.C_GE_S_NOT_CLOSED);
Assert.assertEquals(ResultStatus.ERROR, cr.getResultStatus());
}
public boolean isEdgeInExpectedErrorEdges(Edge e, Geometry geom, List<Vertex> expectedErrorEdges) {
Vertex v0 = e.getFrom();
Vertex v1 = e.getTo();
for (int i = 0; i < expectedErrorEdges.size() - 1; i = i + 2) {
if (expectedErrorEdges.get(i).equals(v0)) {
if (expectedErrorEdges.get(i + 1).equals(v1)) {
return true;
}
}
}
return false;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.Checker;
import de.hft.stuttgart.citydoctor2.check.ErrorId;
import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParser;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class PlanarTest {
@Test
public void testPlanarPolygon1() throws CityGmlParseException, IOException, InvalidGmlFileException {
ParserConfiguration config = new ParserConfiguration(8, false);
CityDoctorModel m = CityGmlParser.parseCityGmlFile("src/test/resources/QA-Ex-C-LR-5.gml", config);
Checker c = new Checker(m);
c.runChecks();
Polygon p1 = TestUtil.getPolygonById("p_w_1", "Example-C-LR-51", m);
CheckResult cr1 = p1.getCheckResult(CheckId.C_GE_P_NON_PLANAR);
assertEquals(ResultStatus.ERROR, cr1.getResultStatus());
assertEquals(ErrorId.GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE, cr1.getError().getErrorId());
Polygon p2 = TestUtil.getPolygonById("p_w_4", "Example-C-LR-51", m);
assertEquals(ResultStatus.OK, p2.getCheckResult(CheckId.C_GE_P_NON_PLANAR).getResultStatus());
Polygon p3 = TestUtil.getPolygonById("p_w_2", "Example-C-LR-52", m);
CheckResult cr3 = p3.getCheckResult(CheckId.C_GE_P_NON_PLANAR);
assertEquals(ResultStatus.ERROR, cr3.getResultStatus());
assertEquals(ErrorId.GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE, cr3.getError().getErrorId());
Polygon p5 = TestUtil.getPolygonById("p_w_4", "Example-C-LR-54", m);
CheckResult cr5 = p5.getCheckResult(CheckId.C_GE_P_NON_PLANAR);
assertEquals(ResultStatus.ERROR, cr5.getResultStatus());
assertEquals(ErrorId.GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE, cr5.getError().getErrorId());
}
@Test
public void testPlanarPolygon2() throws CityGmlParseException, IOException, InvalidGmlFileException {
ParserConfiguration config = new ParserConfiguration(8, false);
CityDoctorModel m = CityGmlParser.parseCityGmlFile("src/test/resources/QA-Ex-C-LR-5GK.gml", config);
Checker c = new Checker(m);
c.runChecks();
Polygon p1 = TestUtil.getPolygonById("p_w_1", m);
CheckResult cr1 = p1.getCheckResult(CheckId.C_GE_P_NON_PLANAR);
assertEquals(ResultStatus.OK, cr1.getResultStatus());
Polygon p2 = TestUtil.getPolygonById("p_r_1", m);
assertEquals(ResultStatus.OK, p2.getCheckResult(CheckId.C_GE_P_NON_PLANAR).getResultStatus());
Polygon p3 = TestUtil.getPolygonById("p_w_2", m);
CheckResult cr3 = p3.getCheckResult(CheckId.C_GE_P_NON_PLANAR);
assertEquals(ResultStatus.ERROR, cr3.getResultStatus());
assertEquals(ErrorId.GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE, cr3.getError().getErrorId());
Polygon p4 = TestUtil.getPolygonById("p_w_3", m);
CheckResult cr4 = p4.getCheckResult(CheckId.C_GE_P_NON_PLANAR);
assertEquals(ResultStatus.ERROR, cr4.getResultStatus());
assertEquals(ErrorId.GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE, cr4.getError().getErrorId());
Polygon p5 = TestUtil.getPolygonById("p_w_4", m);
CheckResult cr5 = p5.getCheckResult(CheckId.C_GE_P_NON_PLANAR);
assertEquals(ResultStatus.ERROR, cr5.getResultStatus());
assertEquals(ErrorId.GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE, cr5.getError().getErrorId());
}
@Test
public void testPlanarPolygon3() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0001-T0002.gml");
for (Polygon p : c.getBuildings().get(0).getGeometries().get(0).getPolygons()) {
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_NON_PLANAR);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
}
@Test
public void testPlanarPolygon4() throws CityGmlParseException, IOException, InvalidGmlFileException {
Map<CheckId, Map<String, String>> paramMap = new EnumMap<>(CheckId.class);
Map<String, String> parameter = new HashMap<>();
parameter.put("distanceTolerance", "0.01");
paramMap.put(CheckId.C_GE_P_NON_PLANAR, parameter);
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0002-T0001.gml", paramMap);
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.2", c);
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_NON_PLANAR);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE, cr.getError().getErrorId());
}
@Test
public void testPlanarPolygon5() throws CityGmlParseException, IOException, InvalidGmlFileException {
Map<CheckId, Map<String, String>> paramMap = new EnumMap<>(CheckId.class);
Map<String, String> parameter = new HashMap<>();
parameter.put("type", "distance");
parameter.put("distanceTolerance", "0.5");
paramMap.put(CheckId.C_GE_P_NON_PLANAR, parameter);
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0002-T0001.gml", paramMap);
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.2", c);
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_NON_PLANAR);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
@Test
public void testPlanarPolygon6() throws CityGmlParseException, IOException, InvalidGmlFileException {
Map<CheckId, Map<String, String>> paramMap = new EnumMap<>(CheckId.class);
Map<String, String> parameter = new HashMap<>();
parameter.put("type", "both");
paramMap.put(CheckId.C_GE_P_NON_PLANAR, parameter);
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0002-T0002.gml", paramMap);
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.1", c);
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_NON_PLANAR);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION, cr.getError().getErrorId());
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.ErrorId;
import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class PolygonIntersectingRingsTest {
@Test
public void testSelfIntPolygon1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
for (Polygon p : c.getBuildings().get(0).getGeometries().get(0).getPolygons()) {
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_INTERSECTING_RINGS);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
}
@Test
public void testSelfIntPolygon2() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0001-T0002.gml");
for (Polygon p : c.getBuildings().get(0).getGeometries().get(0).getPolygons()) {
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_INTERSECTING_RINGS);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
}
@Test
public void testSelfIntPolygon3() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0001-T0001.gml");
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.2", c);
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_INTERSECTING_RINGS);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_P_INTERSECTING_RINGS, cr.getError().getErrorId());
}
@Test
public void testSelfIntPolygon4() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0001-T0003.gml");
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.2", c);
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_INTERSECTING_RINGS);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_P_INTERSECTING_RINGS, cr.getError().getErrorId());
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.Checker;
import de.hft.stuttgart.citydoctor2.check.ErrorId;
import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.LinearRing;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParser;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class RingClosedCheckTest extends TestCleanUp {
@Test
public void testClosedRing1() throws CityGmlParseException, IOException, InvalidGmlFileException {
ParserConfiguration config = new ParserConfiguration(8, false);
CityDoctorModel m = CityGmlParser.parseCityGmlFile("src/test/resources/QA-Ex-C-LR-2.gml", config);
Checker c = new Checker(m);
c.runChecks();
LinearRing r1 = TestUtil.getPolygonById("p_r_1", m).getExteriorRing();
CheckResult cr1 = r1.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS);
assertEquals(ResultStatus.ERROR, cr1.getResultStatus());
assertEquals(ErrorId.GE_R_TOO_FEW_POINTS, cr1.getError().getErrorId());
LinearRing r2 = TestUtil.getPolygonById("p_w_4", m).getExteriorRing();
assertEquals(ResultStatus.OK, r2.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS).getResultStatus());
assertEquals(ResultStatus.OK, r2.getCheckResult(CheckId.C_GE_R_NOT_CLOSED).getResultStatus());
LinearRing r3 = TestUtil.getPolygonById("p_w_1", m).getExteriorRing();
CheckResult cr3 = r3.getCheckResult(CheckId.C_GE_R_NOT_CLOSED);
assertEquals(ResultStatus.ERROR, cr3.getResultStatus());
assertEquals(ErrorId.GE_R_NOT_CLOSED, cr3.getError().getErrorId());
}
@Test
public void testClosedRing2() throws CityGmlParseException, IOException, InvalidGmlFileException {
ParserConfiguration config = new ParserConfiguration(8, false);
CityDoctorModel m = CityGmlParser.parseCityGmlFile("src/test/resources/QA-Ex-C-LR-2GK.gml", config);
Checker c = new Checker(m);
c.runChecks();
LinearRing r1 = TestUtil.getPolygonById("p_r_1", m).getExteriorRing();
CheckResult cr1 = r1.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS);
assertEquals(ResultStatus.ERROR, cr1.getResultStatus());
assertEquals(ErrorId.GE_R_TOO_FEW_POINTS, cr1.getError().getErrorId());
LinearRing r2 = TestUtil.getPolygonById("p_w_4", m).getExteriorRing();
assertEquals(ResultStatus.OK, r2.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS).getResultStatus());
assertEquals(ResultStatus.OK, r2.getCheckResult(CheckId.C_GE_R_NOT_CLOSED).getResultStatus());
LinearRing r3 = TestUtil.getPolygonById("p_w_1", m).getExteriorRing();
CheckResult cr3 = r3.getCheckResult(CheckId.C_GE_R_NOT_CLOSED);
assertEquals(ResultStatus.ERROR, cr3.getResultStatus());
assertEquals(ErrorId.GE_R_NOT_CLOSED, cr3.getError().getErrorId());
}
@Test
public void testClosedRing3() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
for (Polygon p : c.getBuildings().get(0).getGeometries().get(0).getPolygons()) {
LinearRing r = p.getExteriorRing();
CheckResult cr = r.getCheckResult(CheckId.C_GE_R_NOT_CLOSED);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
}
@Test
public void testClosedRing4() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-LR-0003-T0001.gml");
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.6", c);
LinearRing r = p.getExteriorRing();
CheckResult cr = r.getCheckResult(CheckId.C_GE_R_NOT_CLOSED);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_R_NOT_CLOSED, cr.getError().getErrorId());
}
@Test
public void testClosedRing5() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-LR-0003-T0002.gml", 1);
for (Polygon p : c.getBuildings().get(0).getGeometries().get(0).getPolygons()) {
LinearRing r = p.getExteriorRing();
CheckResult cr = r.getCheckResult(CheckId.C_GE_R_NOT_CLOSED);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.Checker;
import de.hft.stuttgart.citydoctor2.check.ErrorId;
import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.LinearRing;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParser;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class RingSelfIntersectionTest {
@Test
public void testSelfIntPoints1() throws CityGmlParseException, IOException, InvalidGmlFileException {
ParserConfiguration config = new ParserConfiguration(8, false);
CityDoctorModel m = CityGmlParser.parseCityGmlFile("src/test/resources/QA-Ex-C-LR-4.gml", config);
Checker c = new Checker(m);
c.runChecks();
Polygon p1 = TestUtil.getPolygonById("p_w_2", m);
LinearRing r1 = p1.getExteriorRing();
CheckResult cr1 = r1.getCheckResult(CheckId.C_GE_R_SELF_INTERSECTION);
assertEquals(ResultStatus.ERROR, cr1.getResultStatus());
assertEquals(ErrorId.GE_R_SELF_INTERSECTION, cr1.getError().getErrorId());
Polygon p2 = TestUtil.getPolygonById("p_w_4", m);
LinearRing r2 = p2.getExteriorRing();
assertEquals(ResultStatus.OK, r2.getCheckResult(CheckId.C_GE_R_SELF_INTERSECTION).getResultStatus());
}
@Test
public void testSelfIntPoints2() throws CityGmlParseException, IOException, InvalidGmlFileException {
ParserConfiguration config = new ParserConfiguration(8, false);
CityDoctorModel m = CityGmlParser.parseCityGmlFile("src/test/resources/QA-Ex-C-LR-4GK.gml", config);
Checker c = new Checker(m);
c.runChecks();
Polygon p1 = TestUtil.getPolygonById("p_w_2", m);
LinearRing r1 = p1.getExteriorRing();
CheckResult cr1 = r1.getCheckResult(CheckId.C_GE_R_SELF_INTERSECTION);
assertEquals(ResultStatus.ERROR, cr1.getResultStatus());
assertEquals(ErrorId.GE_R_SELF_INTERSECTION, cr1.getError().getErrorId());
Polygon p2 = TestUtil.getPolygonById("p_w_4", m);
LinearRing r2 = p2.getExteriorRing();
assertEquals(ResultStatus.OK, r2.getCheckResult(CheckId.C_GE_R_SELF_INTERSECTION).getResultStatus());
}
@Test
public void testSelfIntPoints3() throws CityGmlParseException, IOException, InvalidGmlFileException {
ParserConfiguration config = new ParserConfiguration(8, false);
CityDoctorModel m = CityGmlParser.parseCityGmlFile("src/test/resources/QA-Ex-C-Solid-1.gml", config);
Checker c = new Checker(m);
c.runChecks();
Polygon p1 = TestUtil.getPolygonById("p_w_2", m);
LinearRing r1 = p1.getExteriorRing();
CheckResult cr1 = r1.getCheckResult(CheckId.C_GE_R_SELF_INTERSECTION);
assertEquals(ResultStatus.OK, cr1.getResultStatus());
Polygon p2 = TestUtil.getPolygonById("p_w_4", m);
LinearRing r2 = p2.getExteriorRing();
assertEquals(ResultStatus.OK, r2.getCheckResult(CheckId.C_GE_R_SELF_INTERSECTION).getResultStatus());
}
@Test
public void testSelfIntPoints4() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
for (Polygon p : c.getBuildings().get(0).getGeometries().get(0).getPolygons()) {
LinearRing r = p.getExteriorRing();
CheckResult cr = r.getCheckResult(CheckId.C_GE_R_SELF_INTERSECTION);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
}
@Test
public void testSelfIntPoints5() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-LR-0004-T0004.gml");
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.6", c);
LinearRing r = p.getExteriorRing();
CheckResult cr = r.getCheckResult(CheckId.C_GE_R_SELF_INTERSECTION);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_R_SELF_INTERSECTION, cr.getError().getErrorId());
}
@Test
public void testSelfIntPoints6() throws CityGmlParseException, IOException, InvalidGmlFileException {
Map<String, String> param = new HashMap<>();
param.put("minVertexDistance", "0.1");
Map<CheckId, Map<String, String>> params = new HashMap<>();
params.put(CheckId.C_GE_R_SELF_INTERSECTION, param);
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-LR-0004-T0005.gml", params);
Polygon p = TestUtil.getPolygonById("_Simple_BD.1_PG.2", c);
LinearRing r = p.getExteriorRing();
CheckResult cr = r.getCheckResult(CheckId.C_GE_R_SELF_INTERSECTION);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_R_SELF_INTERSECTION, cr.getError().getErrorId());
}
@Test
public void testSelfIntPoints7() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-LR-0004-T0005.gml", 2);
for (Polygon p : c.getBuildings().get(0).getGeometries().get(0).getPolygons()) {
LinearRing r = p.getExteriorRing();
CheckResult cr = r.getCheckResult(CheckId.C_GE_R_SELF_INTERSECTION);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.ErrorId;
import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class ShellNotClosedSystemTest {
@Test
public void testShellNotClosed1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NOT_CLOSED);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
@Test
public void testShellNotClosed2() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0002-T0001.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NOT_CLOSED);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_S_NOT_CLOSED, cr.getError().getErrorId());
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import java.io.File;
import org.junit.After;
/**
*
* @author Matthias Betz
*
*/
public class TestCleanUp {
@After
public void cleanup() {
File f = new File("test/testdata/out.xml");
if (f.exists()) {
f.delete();
}
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import java.io.IOException;
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;
import de.hft.stuttgart.citydoctor2.datastructure.CityObject;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParser;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class TestUtil {
public static CityDoctorModel loadAndCheckCityModel(String path) throws CityGmlParseException, IOException, InvalidGmlFileException {
ValidationConfiguration valConfig = ValidationConfiguration.loadStandardValidationConfig();
CityDoctorModel m = CityGmlParser.parseCityGmlFile(path, valConfig.getParserConfiguration());
Checker c = new Checker(valConfig, m);
c.runChecks();
return m;
}
public static CityDoctorModel loadAndCheckCityModel(String path, int numberOfRoundingPlaces)
throws CityGmlParseException, IOException, InvalidGmlFileException {
ValidationConfiguration config = ValidationConfiguration.loadStandardValidationConfig();
config.setNumberOfRoundingPlaces(numberOfRoundingPlaces);
CityDoctorModel m = CityGmlParser.parseCityGmlFile(path, config.getParserConfiguration());
Checker c = new Checker(config, m);
c.runChecks();
return m;
}
public static CityDoctorModel loadAndCheckCityModel(String path, Map<CheckId, Map<String, String>> paramMap)
throws CityGmlParseException, IOException, InvalidGmlFileException {
ValidationConfiguration valConfig = ValidationConfiguration.loadStandardValidationConfig();
for (Entry<CheckId, Map<String, String>> e : paramMap.entrySet()) {
valConfig.getChecks().get(e.getKey()).setParameters(e.getValue());
}
CityDoctorModel m = CityGmlParser.parseCityGmlFile(path, valConfig.getParserConfiguration());
Checker c = new Checker(valConfig, m);
c.runChecks();
return m;
}
public static Polygon getPolygonById(String gmlId, CityDoctorModel model) {
if (gmlId == null) {
return null;
}
Polygon result = getPolygonById(gmlId, model.getBuildings());
if (result != null) {
return result;
}
result = getPolygonById(gmlId, model.getVegetation());
if (result != null) {
return result;
}
return getPolygonById(gmlId, model.getTransportation());
}
private static Polygon getPolygonById(String gmlId, List<? extends CityObject> features) {
if (gmlId == null) {
return null;
}
for (CityObject co : features) {
Polygon result = getPolygonById(gmlId, co);
if (result != null) {
return result;
}
}
return null;
}
public static Polygon getPolygonById(String gmlId, String featureId, CityDoctorModel model) {
if (gmlId == null || featureId == null) {
return null;
}
CityObject co = getCityObjectById(featureId, model);
return getPolygonById(gmlId, co);
}
private static Polygon getPolygonById(String gmlId, CityObject co) {
for (Geometry geom : co.getGeometries()) {
for (Polygon p : geom.getPolygons()) {
if (gmlId.equals(p.getGmlId().getGmlString())) {
return p;
}
}
}
return null;
}
private static CityObject getCityObjectById(String featureId, CityDoctorModel model) {
if (featureId == null) {
return null;
}
for (CityObject co : model.getBuildings()) {
if (featureId.equals(co.getGmlId().getGmlString())) {
return co;
}
}
for (CityObject co : model.getTransportation()) {
if (featureId.equals(co.getGmlId().getGmlString())) {
return co;
}
}
for (CityObject co : model.getVegetation()) {
if (featureId.equals(co.getGmlId().getGmlString())) {
return co;
}
}
return null;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.systemtest;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.ErrorId;
import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
/**
*
* @author Matthias Betz
*
*/
public class TooFewPolygonsSystemTest {
@Test
public void testTooFewPolygons1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_TOO_FEW_POLYGONS);
assertEquals(ResultStatus.OK, cr.getResultStatus());
}
@Test
public void testTooFewPolygons2() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0001-T0001.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_TOO_FEW_POLYGONS);
assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_S_TOO_FEW_POLYGONS, cr.getError().getErrorId());
}
}
<?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:tex="http://www.opengis.net/citygml/texturedsurface/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: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:xlink="http://www.w3.org/1999/xlink" xmlns:luse="http://www.opengis.net/citygml/landuse/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="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/texturedsurface/2.0 http://schemas.opengis.net/citygml/texturedsurface/2.0/texturedSurface.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/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/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/landuse/2.0 http://schemas.opengis.net/citygml/landuse/2.0/landUse.xsd">
<core:cityObjectMember>
<bldg:Building gml:id="CityDoctor_1559135997988_163">
<bldg:lod2Solid>
<gml:Solid>
<gml:exterior>
<gml:CompositeSurface>
<gml:surfaceMember xlink:href="#CityDoctor_1559135997987_139"/>
<gml:surfaceMember xlink:href="#CityDoctor_1559135997987_141"/>
<gml:surfaceMember xlink:href="#CityDoctor_1559135997987_143"/>
<gml:surfaceMember xlink:href="#CityDoctor_1559135997987_145"/>
<gml:surfaceMember xlink:href="#CityDoctor_1559135997987_147"/>
<gml:surfaceMember xlink:href="#CityDoctor_1559135997987_149"/>
<gml:surfaceMember xlink:href="#CityDoctor_1559135997988_151"/>
<gml:surfaceMember xlink:href="#CityDoctor_1559135997988_153"/>
<gml:surfaceMember xlink:href="#CityDoctor_1559135997988_155"/>
<gml:surfaceMember xlink:href="#CityDoctor_1559135997988_157"/>
<gml:surfaceMember xlink:href="#CityDoctor_1559135997988_159"/>
<gml:surfaceMember xlink:href="#CityDoctor_1559135997988_161"/>
</gml:CompositeSurface>
</gml:exterior>
</gml:Solid>
</bldg:lod2Solid>
<bldg:boundedBy>
<bldg:GroundSurface gml:id="CityDoctor_1559135997988_164">
<bldg:lod2MultiSurface>
<gml:MultiSurface gml:id="CityDoctor_1559135998585_176">
<gml:surfaceMember>
<gml:Polygon gml:id="CityDoctor_1559135997987_139">
<gml:exterior>
<gml:LinearRing gml:id="CityDoctor_1559135997987_140">
<gml:posList srsDimension="3">1219579.097099965 -1.5828313056622382E7 6.208911855377838 1219559.6603210282 -1.5828304859653471E7 6.208911855377838 1219557.5511082944 -1.5828303970069965E7 6.208911855377838 1219606.089101037 -1.5828190917620296E7 6.208911855377838 1219607.4894328213 -1.5828191508307556E7 6.208911855377838 1219598.6184827196 -1.5828212543349296E7 6.208911855377838 1219598.5880654657 -1.5828212555854488E7 6.208911855377838 1219583.6698401568 -1.582824792908068E7 6.208911855377838 1219592.9228448267 -1.5828251831488144E7 6.208911855377838 1219603.522748943 -1.5828256301996516E7 6.208911855377838 1219579.097099965 -1.5828313056622382E7 6.208911855377838</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod2MultiSurface>
</bldg:GroundSurface>
</bldg:boundedBy>
<bldg:boundedBy>
<bldg:RoofSurface gml:id="CityDoctor_1559135997988_165">
<bldg:lod2MultiSurface>
<gml:MultiSurface gml:id="CityDoctor_1559135998585_177">
<gml:surfaceMember>
<gml:Polygon gml:id="CityDoctor_1559135997987_141">
<gml:exterior>
<gml:LinearRing gml:id="CityDoctor_1559135997987_142">
<gml:posList srsDimension="3">1219603.522748943 -1.5828256301996516E7 58.702211855379744 1219592.9228448267 -1.5828251831488144E7 58.702211855379744 1219583.6698401568 -1.582824792908068E7 58.702211855379744 1219598.5880654657 -1.5828212555854488E7 58.702211855379744 1219598.6184827196 -1.5828212543349296E7 58.702211855379744 1219607.4894328213 -1.5828191508307556E7 58.702211855379744 1219606.089101037 -1.5828190917620296E7 58.702211855379744 1219557.5511082944 -1.5828303970069965E7 58.702211855379744 1219559.6603210282 -1.5828304859653471E7 58.702211855379744 1219579.097099965 -1.5828313056622382E7 58.702211855379744 1219603.522748943 -1.5828256301996516E7 58.702211855379744</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod2MultiSurface>
</bldg:RoofSurface>
</bldg:boundedBy>
<bldg:boundedBy>
<bldg:WallSurface gml:id="CityDoctor_1559135997988_166">
<bldg:lod2MultiSurface>
<gml:MultiSurface gml:id="CityDoctor_1559135998585_178">
<gml:surfaceMember>
<gml:Polygon gml:id="CityDoctor_1559135997987_143">
<gml:exterior>
<gml:LinearRing gml:id="CityDoctor_1559135997987_144">
<gml:posList srsDimension="3">1219603.522748943 -1.5828256301996516E7 6.208911855377838 1219603.522748943 -1.5828256301996516E7 58.702211855379744 1219579.097099965 -1.5828313056622382E7 58.702211855379744 1219579.097099965 -1.5828313056622382E7 6.208911855377838 1219603.522748943 -1.5828256301996516E7 6.208911855377838</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod2MultiSurface>
</bldg:WallSurface>
</bldg:boundedBy>
<bldg:boundedBy>
<bldg:WallSurface gml:id="CityDoctor_1559135997988_167">
<bldg:lod2MultiSurface>
<gml:MultiSurface gml:id="CityDoctor_1559135998585_179">
<gml:surfaceMember>
<gml:Polygon gml:id="CityDoctor_1559135997987_145">
<gml:exterior>
<gml:LinearRing gml:id="CityDoctor_1559135997987_146">
<gml:posList srsDimension="3">1219592.9228448267 -1.5828251831488144E7 6.208911855377838 1219592.9228448267 -1.5828251831488144E7 58.702211855379744 1219603.522748943 -1.5828256301996516E7 58.702211855379744 1219603.522748943 -1.5828256301996516E7 6.208911855377838 1219592.9228448267 -1.5828251831488144E7 6.208911855377838</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod2MultiSurface>
</bldg:WallSurface>
</bldg:boundedBy>
<bldg:boundedBy>
<bldg:WallSurface gml:id="CityDoctor_1559135997988_168">
<bldg:lod2MultiSurface>
<gml:MultiSurface gml:id="CityDoctor_1559135998586_180">
<gml:surfaceMember>
<gml:Polygon gml:id="CityDoctor_1559135997987_147">
<gml:exterior>
<gml:LinearRing gml:id="CityDoctor_1559135997987_148">
<gml:posList srsDimension="3">1219583.6698401568 -1.582824792908068E7 6.208911855377838 1219583.6698401568 -1.582824792908068E7 58.702211855379744 1219592.9228448267 -1.5828251831488144E7 58.702211855379744 1219592.9228448267 -1.5828251831488144E7 6.208911855377838 1219583.6698401568 -1.582824792908068E7 6.208911855377838</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod2MultiSurface>
</bldg:WallSurface>
</bldg:boundedBy>
<bldg:boundedBy>
<bldg:WallSurface gml:id="CityDoctor_1559135997988_169">
<bldg:lod2MultiSurface>
<gml:MultiSurface gml:id="CityDoctor_1559135998586_181">
<gml:surfaceMember>
<gml:Polygon gml:id="CityDoctor_1559135997987_149">
<gml:exterior>
<gml:LinearRing gml:id="CityDoctor_1559135997988_150">
<gml:posList srsDimension="3">1219598.5880654657 -1.5828212555854488E7 6.208911855377838 1219598.5880654657 -1.5828212555854488E7 58.702211855379744 1219583.6698401568 -1.582824792908068E7 58.702211855379744 1219583.6698401568 -1.582824792908068E7 6.208911855377838 1219598.5880654657 -1.5828212555854488E7 6.208911855377838</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod2MultiSurface>
</bldg:WallSurface>
</bldg:boundedBy>
<bldg:boundedBy>
<bldg:WallSurface gml:id="CityDoctor_1559135997988_170">
<bldg:lod2MultiSurface>
<gml:MultiSurface gml:id="CityDoctor_1559135998586_182">
<gml:surfaceMember>
<gml:Polygon gml:id="CityDoctor_1559135997988_151">
<gml:exterior>
<gml:LinearRing gml:id="CityDoctor_1559135997988_152">
<gml:posList srsDimension="3">1219598.6184827196 -1.5828212543349296E7 6.208911855377838 1219598.6184827196 -1.5828212543349296E7 58.702211855379744 1219598.5880654657 -1.5828212555854488E7 58.702211855379744 1219598.5880654657 -1.5828212555854488E7 6.208911855377838 1219598.6184827196 -1.5828212543349296E7 6.208911855377838</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod2MultiSurface>
</bldg:WallSurface>
</bldg:boundedBy>
<bldg:boundedBy>
<bldg:WallSurface gml:id="CityDoctor_1559135997988_171">
<bldg:lod2MultiSurface>
<gml:MultiSurface gml:id="CityDoctor_1559135998586_183">
<gml:surfaceMember>
<gml:Polygon gml:id="CityDoctor_1559135997988_153">
<gml:exterior>
<gml:LinearRing gml:id="CityDoctor_1559135997988_154">
<gml:posList srsDimension="3">1219607.4894328213 -1.5828191508307556E7 6.208911855377838 1219607.4894328213 -1.5828191508307556E7 58.702211855379744 1219598.6184827196 -1.5828212543349296E7 58.702211855379744 1219598.6184827196 -1.5828212543349296E7 6.208911855377838 1219607.4894328213 -1.5828191508307556E7 6.208911855377838</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod2MultiSurface>
</bldg:WallSurface>
</bldg:boundedBy>
<bldg:boundedBy>
<bldg:WallSurface gml:id="CityDoctor_1559135997988_172">
<bldg:lod2MultiSurface>
<gml:MultiSurface gml:id="CityDoctor_1559135998586_184">
<gml:surfaceMember>
<gml:Polygon gml:id="CityDoctor_1559135997988_155">
<gml:exterior>
<gml:LinearRing gml:id="CityDoctor_1559135997988_156">
<gml:posList srsDimension="3">1219606.089101037 -1.5828190917620296E7 6.208911855377838 1219606.089101037 -1.5828190917620296E7 58.702211855379744 1219607.4894328213 -1.5828191508307556E7 58.702211855379744 1219607.4894328213 -1.5828191508307556E7 6.208911855377838 1219606.089101037 -1.5828190917620296E7 6.208911855377838</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod2MultiSurface>
</bldg:WallSurface>
</bldg:boundedBy>
<bldg:boundedBy>
<bldg:WallSurface gml:id="CityDoctor_1559135997988_173">
<bldg:lod2MultiSurface>
<gml:MultiSurface gml:id="CityDoctor_1559135998586_185">
<gml:surfaceMember>
<gml:Polygon gml:id="CityDoctor_1559135997988_157">
<gml:exterior>
<gml:LinearRing gml:id="CityDoctor_1559135997988_158">
<gml:posList srsDimension="3">1219557.5511082944 -1.5828303970069965E7 6.208911855377838 1219557.5511082944 -1.5828303970069965E7 58.702211855379744 1219606.089101037 -1.5828190917620296E7 58.702211855379744 1219606.089101037 -1.5828190917620296E7 6.208911855377838 1219557.5511082944 -1.5828303970069965E7 6.208911855377838</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod2MultiSurface>
</bldg:WallSurface>
</bldg:boundedBy>
<bldg:boundedBy>
<bldg:WallSurface gml:id="CityDoctor_1559135997988_174">
<bldg:lod2MultiSurface>
<gml:MultiSurface gml:id="CityDoctor_1559135998586_186">
<gml:surfaceMember>
<gml:Polygon gml:id="CityDoctor_1559135997988_159">
<gml:exterior>
<gml:LinearRing gml:id="CityDoctor_1559135997988_160">
<gml:posList srsDimension="3">1219559.6603210282 -1.5828304859653471E7 6.208911855377838 1219559.6603210282 -1.5828304859653471E7 58.702211855379744 1219557.5511082944 -1.5828303970069965E7 58.702211855379744 1219557.5511082944 -1.5828303970069965E7 6.208911855377838 1219559.6603210282 -1.5828304859653471E7 6.208911855377838</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod2MultiSurface>
</bldg:WallSurface>
</bldg:boundedBy>
<bldg:boundedBy>
<bldg:WallSurface gml:id="CityDoctor_1559135997989_175">
<bldg:lod2MultiSurface>
<gml:MultiSurface gml:id="CityDoctor_1559135998586_187">
<gml:surfaceMember>
<gml:Polygon gml:id="CityDoctor_1559135997988_161">
<gml:exterior>
<gml:LinearRing gml:id="CityDoctor_1559135997988_162">
<gml:posList srsDimension="3">1219579.097099965 -1.5828313056622382E7 6.208911855377838 1219579.097099965 -1.5828313056622382E7 58.702211855379744 1219559.6603210282 -1.5828304859653471E7 58.702211855379744 1219559.6603210282 -1.5828304859653471E7 6.208911855377838 1219579.097099965 -1.5828313056622382E7 6.208911855377838</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod2MultiSurface>
</bldg:WallSurface>
</bldg:boundedBy>
</bldg:Building>
</core:cityObjectMember>
</core:CityModel>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--SGJ Exporter (http://www.supportgis.de) -->
<CityModel xmlns="http://www.opengis.net/citygml/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trans="http://www.opengis.net/citygml/transportation/1.0"
xmlns:wtr="http://www.opengis.net/citygml/waterbody/1.0" xmlns:gml="http://www.opengis.net/gml"
xmlns:smil20lang="http://www.w3.org/2001/SMIL20/Language" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:grp="http://www.opengis.net/citygml/cityobjectgroup/1.0"
xmlns:luse="http://www.opengis.net/citygml/landuse/1.0" xmlns:frn="http://www.opengis.net/citygml/cityfurniture/1.0"
xmlns:app="http://www.opengis.net/citygml/appearance/1.0" xmlns:tex="http://www.opengis.net/citygml/texturedsurface/1.0"
xmlns:smil20="http://www.w3.org/2001/SMIL20/" xmlns:xAL="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"
xmlns:bldg="http://www.opengis.net/citygml/building/1.0" xmlns:dem="http://www.opengis.net/citygml/relief/1.0"
xmlns:veg="http://www.opengis.net/citygml/vegetation/1.0" xmlns:gen="http://www.opengis.net/citygml/generics/1.0"
xsi:schemaLocation="http://www.opengis.net/citygml/landuse/1.0 http://schemas.opengis.net/citygml/landuse/1.0/landUse.xsd http://www.opengis.net/citygml/cityfurniture/1.0 http://schemas.opengis.net/citygml/cityfurniture/1.0/cityFurniture.xsd http://www.opengis.net/citygml/appearance/1.0 http://schemas.opengis.net/citygml/appearance/1.0/appearance.xsd http://www.opengis.net/citygml/texturedsurface/1.0 http://schemas.opengis.net/citygml/texturedsurface/1.0/texturedSurface.xsd http://www.opengis.net/citygml/transportation/1.0 http://schemas.opengis.net/citygml/transportation/1.0/transportation.xsd http://www.opengis.net/citygml/waterbody/1.0 http://schemas.opengis.net/citygml/waterbody/1.0/waterBody.xsd http://www.opengis.net/citygml/building/1.0 http://schemas.opengis.net/citygml/building/1.0/building.xsd http://www.opengis.net/citygml/relief/1.0 http://schemas.opengis.net/citygml/relief/1.0/relief.xsd http://www.opengis.net/citygml/vegetation/1.0 http://schemas.opengis.net/citygml/vegetation/1.0/vegetation.xsd http://www.opengis.net/citygml/cityobjectgroup/1.0 http://schemas.opengis.net/citygml/cityobjectgroup/1.0/cityObjectGroup.xsd http://www.opengis.net/citygml/generics/1.0 http://schemas.opengis.net/citygml/generics/1.0/generics.xsd">
<!--
Wagner, 28.09.2011
2 unconnected simple buildings with saddle roof
modelled as one bldg:Buiding
Local coordinates
-->
<cityObjectMember>
<bldg:Building gml:id="Example-Concomp">
<creationDate>2010-12-22</creationDate>
<bldg:lod1Solid>
<!-- first component -->
<gml:Solid>
<gml:exterior>
<gml:CompositeSurface>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_1">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 0.00 0.00
2.00 0.00 0.00
2.00 0.00 3.00
1.00 0.00 3.50
0.00 0.00 3.00
0.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_2">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
2.00 0.00 0.00
2.00 2.00 0.00
2.00 2.00 3.00
2.00 0.00 3.00
2.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_3">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
2.00 2.00 0.00
0.00 2.00 0.00
0.00 2.00 3.00
1.00 2.00 3.50
2.00 2.00 3.00
2.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_4">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 2.00 0.00
0.00 0.00 0.00
0.00 0.00 3.00
0.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_5">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 2.00 0.00
0.00 0.00 3.00
0.00 2.00 3.00
0.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_g_1">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 0.00 0.00
0.00 2.00 0.00
2.00 2.00 0.00
2.00 0.00 0.00
0.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_1">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 0.00 3.00
1.00 0.00 3.50
1.00 2.00 3.50
0.00 2.00 3.00
0.00 0.00 3.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_3">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
2.00 0.00 3.00
2.00 2.00 3.00
1.00 2.00 3.50
1.00 0.00 3.50
2.00 0.00 3.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<!-- second component -->
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_1a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3.00 0.00 0.00
5.00 0.00 0.00
5.00 0.00 3.00
4.00 0.00 3.50
3.00 0.00 3.00
3.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_2a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
5.00 0.00 0.00
5.00 2.00 0.00
5.00 2.00 3.00
5.00 0.00 3.00
5.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_3a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
5.00 2.00 0.00
3.00 2.00 0.00
3.00 2.00 3.00
4.00 2.00 3.50
5.00 2.00 3.00
5.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_4a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3.00 2.00 0.00
3.00 0.00 0.00
3.00 0.00 3.00
3.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_5a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3.00 2.00 0.00
3.00 0.00 3.00
3.00 2.00 3.00
3.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_g_1a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3.00 0.00 0.00
3.00 2.00 0.00
5.00 2.00 0.00
5.00 0.00 0.00
3.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_1a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3.00 0.00 3.00
4.00 0.00 3.50
4.00 2.00 3.50
3.00 2.00 3.00
3.00 0.00 3.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_3a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
5.00 0.00 3.00
5.00 2.00 3.00
4.00 2.00 3.50
4.00 0.00 3.50
5.00 0.00 3.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:CompositeSurface>
</gml:exterior>
</gml:Solid>
</bldg:lod1Solid>
</bldg:Building>
</cityObjectMember>
</CityModel>
<?xml version="1.0" encoding="UTF-8"?>
<!--SGJ Exporter (http://www.supportgis.de) -->
<CityModel xmlns="http://www.opengis.net/citygml/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trans="http://www.opengis.net/citygml/transportation/1.0"
xmlns:wtr="http://www.opengis.net/citygml/waterbody/1.0" xmlns:gml="http://www.opengis.net/gml"
xmlns:smil20lang="http://www.w3.org/2001/SMIL20/Language" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:grp="http://www.opengis.net/citygml/cityobjectgroup/1.0"
xmlns:luse="http://www.opengis.net/citygml/landuse/1.0" xmlns:frn="http://www.opengis.net/citygml/cityfurniture/1.0"
xmlns:app="http://www.opengis.net/citygml/appearance/1.0" xmlns:tex="http://www.opengis.net/citygml/texturedsurface/1.0"
xmlns:smil20="http://www.w3.org/2001/SMIL20/" xmlns:xAL="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"
xmlns:bldg="http://www.opengis.net/citygml/building/1.0" xmlns:dem="http://www.opengis.net/citygml/relief/1.0"
xmlns:veg="http://www.opengis.net/citygml/vegetation/1.0" xmlns:gen="http://www.opengis.net/citygml/generics/1.0"
xsi:schemaLocation="http://www.opengis.net/citygml/landuse/1.0 http://schemas.opengis.net/citygml/landuse/1.0/landUse.xsd http://www.opengis.net/citygml/cityfurniture/1.0 http://schemas.opengis.net/citygml/cityfurniture/1.0/cityFurniture.xsd http://www.opengis.net/citygml/appearance/1.0 http://schemas.opengis.net/citygml/appearance/1.0/appearance.xsd http://www.opengis.net/citygml/texturedsurface/1.0 http://schemas.opengis.net/citygml/texturedsurface/1.0/texturedSurface.xsd http://www.opengis.net/citygml/transportation/1.0 http://schemas.opengis.net/citygml/transportation/1.0/transportation.xsd http://www.opengis.net/citygml/waterbody/1.0 http://schemas.opengis.net/citygml/waterbody/1.0/waterBody.xsd http://www.opengis.net/citygml/building/1.0 http://schemas.opengis.net/citygml/building/1.0/building.xsd http://www.opengis.net/citygml/relief/1.0 http://schemas.opengis.net/citygml/relief/1.0/relief.xsd http://www.opengis.net/citygml/vegetation/1.0 http://schemas.opengis.net/citygml/vegetation/1.0/vegetation.xsd http://www.opengis.net/citygml/cityobjectgroup/1.0 http://schemas.opengis.net/citygml/cityobjectgroup/1.0/cityObjectGroup.xsd http://www.opengis.net/citygml/generics/1.0 http://schemas.opengis.net/citygml/generics/1.0/generics.xsd">
<!--
Wagner, 28.09.2011
2 unconnected simple buildings with saddle roof
modelled as one bldg:Buiding
Coordinates according to Gauss-Krueger, Zone 3
-->
<cityObjectMember>
<bldg:Building gml:id="Example-C-LR-1">
<creationDate>2010-12-22</creationDate>
<bldg:lod1Solid>
<gml:Solid>
<!-- second component -->
<gml:exterior>
<gml:CompositeSurface>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_1">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456835.73 5430511.00 115.22
3456840.23 5430511.00 115.22
3456840.23 5430511.00 119.47
3456837.98 5430511.00 120.97
3456835.73 5430511.00 119.47
3456835.73 5430511.00 115.22
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_2">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456840.23 5430511.00 115.22
3456840.23 5430516.00 115.22
3456840.23 5430516.00 119.47
3456840.23 5430511.00 119.47
3456840.23 5430511.00 115.22
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_3">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456840.23 5430516.00 115.22
3456835.73 5430516.00 115.22
3456835.73 5430516.00 119.47
3456837.98 5430516.00 120.97
3456840.23 5430516.00 119.47
3456840.23 5430516.00 115.22
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_4">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456835.73 5430516.00 115.22
3456835.73 5430511.00 115.22
3456835.73 5430511.00 119.47
3456835.73 5430516.00 115.22
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_5">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456835.73 5430516.00 115.22
3456835.73 5430511.00 119.47
3456835.73 5430516.00 119.47
3456835.73 5430516.00 115.22
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_g_1">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456835.73 5430511.00 115.22
3456835.73 5430516.00 115.22
3456840.23 5430516.00 115.22
3456840.23 5430511.00 115.22
3456835.73 5430511.00 115.22
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_1">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456835.73 5430511.00 119.47
3456837.98 5430511.00 120.97
3456837.98 5430516.00 120.97
3456835.73 5430516.00 119.47
3456835.73 5430511.00 119.47
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_3">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456840.23 5430516.00 119.47
3456837.98 5430516.00 120.97
3456837.98 5430511.00 120.97
3456840.23 5430511.00 119.47
3456840.23 5430516.00 119.47
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<!-- second component -->
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_1a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456845.73 5430511.00 115.22
3456850.23 5430511.00 115.22
3456850.23 5430511.00 119.47
3456847.98 5430511.00 120.97
3456845.73 5430511.00 119.47
3456845.73 5430511.00 115.22
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_2a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456850.23 5430511.00 115.22
3456850.23 5430516.00 115.22
3456850.23 5430516.00 119.47
3456850.23 5430511.00 119.47
3456850.23 5430511.00 115.22
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_3a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456850.23 5430516.00 115.22
3456845.73 5430516.00 115.22
3456845.73 5430516.00 119.47
3456847.98 5430516.00 120.97
3456850.23 5430516.00 119.47
3456850.23 5430516.00 115.22
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_4a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456845.73 5430516.00 115.22
3456845.73 5430511.00 115.22
3456845.73 5430511.00 119.47
3456845.73 5430516.00 115.22
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_5a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456845.73 5430516.00 115.22
3456845.73 5430511.00 119.47
3456845.73 5430516.00 119.47
3456845.73 5430516.00 115.22
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_g_1a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456845.73 5430511.00 115.22
3456845.73 5430516.00 115.22
3456850.23 5430516.00 115.22
3456850.23 5430511.00 115.22
3456845.73 5430511.00 115.22
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_1a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456845.73 5430511.00 119.47
3456847.98 5430511.00 120.97
3456847.98 5430516.00 120.97
3456845.73 5430516.00 119.47
3456845.73 5430511.00 119.47
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_3a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3456850.23 5430516.00 119.47
3456847.98 5430516.00 120.97
3456847.98 5430511.00 120.97
3456850.23 5430511.00 119.47
3456850.23 5430516.00 119.47
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:CompositeSurface>
</gml:exterior>
</gml:Solid>
</bldg:lod1Solid>
</bldg:Building>
</cityObjectMember>
</CityModel>
<?xml version="1.0" encoding="UTF-8"?>
<!--SGJ Exporter (http://www.supportgis.de) -->
<CityModel xmlns="http://www.opengis.net/citygml/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trans="http://www.opengis.net/citygml/transportation/1.0"
xmlns:wtr="http://www.opengis.net/citygml/waterbody/1.0" xmlns:gml="http://www.opengis.net/gml"
xmlns:smil20lang="http://www.w3.org/2001/SMIL20/Language" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:grp="http://www.opengis.net/citygml/cityobjectgroup/1.0"
xmlns:luse="http://www.opengis.net/citygml/landuse/1.0" xmlns:frn="http://www.opengis.net/citygml/cityfurniture/1.0"
xmlns:app="http://www.opengis.net/citygml/appearance/1.0" xmlns:tex="http://www.opengis.net/citygml/texturedsurface/1.0"
xmlns:smil20="http://www.w3.org/2001/SMIL20/" xmlns:xAL="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"
xmlns:bldg="http://www.opengis.net/citygml/building/1.0" xmlns:dem="http://www.opengis.net/citygml/relief/1.0"
xmlns:veg="http://www.opengis.net/citygml/vegetation/1.0" xmlns:gen="http://www.opengis.net/citygml/generics/1.0"
xsi:schemaLocation="http://www.opengis.net/citygml/landuse/1.0 http://schemas.opengis.net/citygml/landuse/1.0/landUse.xsd http://www.opengis.net/citygml/cityfurniture/1.0 http://schemas.opengis.net/citygml/cityfurniture/1.0/cityFurniture.xsd http://www.opengis.net/citygml/appearance/1.0 http://schemas.opengis.net/citygml/appearance/1.0/appearance.xsd http://www.opengis.net/citygml/texturedsurface/1.0 http://schemas.opengis.net/citygml/texturedsurface/1.0/texturedSurface.xsd http://www.opengis.net/citygml/transportation/1.0 http://schemas.opengis.net/citygml/transportation/1.0/transportation.xsd http://www.opengis.net/citygml/waterbody/1.0 http://schemas.opengis.net/citygml/waterbody/1.0/waterBody.xsd http://www.opengis.net/citygml/building/1.0 http://schemas.opengis.net/citygml/building/1.0/building.xsd http://www.opengis.net/citygml/relief/1.0 http://schemas.opengis.net/citygml/relief/1.0/relief.xsd http://www.opengis.net/citygml/vegetation/1.0 http://schemas.opengis.net/citygml/vegetation/1.0/vegetation.xsd http://www.opengis.net/citygml/cityobjectgroup/1.0 http://schemas.opengis.net/citygml/cityobjectgroup/1.0/cityObjectGroup.xsd http://www.opengis.net/citygml/generics/1.0 http://schemas.opengis.net/citygml/generics/1.0/generics.xsd">
<!--
alam, 20.12.2011
2 unconnected simple buildings with saddle roof having 2polyperedge error
modelled as one bldg:Buiding
Local coordinates
-->
<cityObjectMember>
<bldg:Building gml:id="QA-CS-CONCOMP-2POLYERROR">
<creationDate>2010-12-22</creationDate>
<bldg:lod1Solid>
<!-- first component -->
<gml:Solid>
<gml:exterior>
<gml:CompositeSurface>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_2">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
2.00 0.00 0.00
2.00 2.00 0.00
2.00 2.00 3.00
2.00 0.00 3.00
2.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_3">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
2.00 2.00 0.00
0.00 2.00 0.00
0.00 2.00 3.00
1.00 2.00 3.50
2.00 2.00 3.00
2.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_4">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 2.00 0.00
0.00 0.00 0.00
0.00 0.00 3.00
0.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_5">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 2.00 0.00
0.00 0.00 3.00
0.00 2.00 3.00
0.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_g_1">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 0.00 0.00
0.00 2.00 0.00
2.00 2.00 0.00
2.00 0.00 0.00
0.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_1">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 0.00 3.00
1.00 0.00 3.50
1.00 2.00 3.50
0.00 2.00 3.00
0.00 0.00 3.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_3">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
2.00 0.00 3.00
2.00 2.00 3.00
1.00 2.00 3.50
1.00 0.00 3.50
2.00 0.00 3.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<!-- second component -->
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_1a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3.00 0.00 0.00
5.00 0.00 0.00
5.00 0.00 3.00
4.00 0.00 3.50
3.00 0.00 3.00
3.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_2a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
5.00 0.00 0.00
5.00 2.00 0.00
5.00 2.00 3.00
5.00 0.00 3.00
5.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_3a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
5.00 2.00 0.00
3.00 2.00 0.00
3.00 2.00 3.00
4.00 2.00 3.50
5.00 2.00 3.00
5.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_4a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3.00 2.00 0.00
3.00 0.00 0.00
3.00 0.00 3.00
3.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_5a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3.00 2.00 0.00
3.00 0.00 3.00
3.00 2.00 3.00
3.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_g_1a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3.00 0.00 0.00
3.00 2.00 0.00
5.00 2.00 0.00
5.00 0.00 0.00
3.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_1a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
3.00 0.00 3.00
4.00 0.00 3.50
4.00 2.00 3.50
3.00 2.00 3.00
3.00 0.00 3.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_3a">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
5.00 0.00 3.00
5.00 2.00 3.00
4.00 2.00 3.50
4.00 0.00 3.50
5.00 0.00 3.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:CompositeSurface>
</gml:exterior>
</gml:Solid>
</bldg:lod1Solid>
</bldg:Building>
</cityObjectMember>
</CityModel>
<?xml version="1.0" encoding="UTF-8"?>
<!--SGJ Exporter (http://www.supportgis.de) -->
<CityModel xmlns="http://www.opengis.net/citygml/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trans="http://www.opengis.net/citygml/transportation/1.0"
xmlns:wtr="http://www.opengis.net/citygml/waterbody/1.0" xmlns:gml="http://www.opengis.net/gml"
xmlns:smil20lang="http://www.w3.org/2001/SMIL20/Language" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:grp="http://www.opengis.net/citygml/cityobjectgroup/1.0"
xmlns:luse="http://www.opengis.net/citygml/landuse/1.0" xmlns:frn="http://www.opengis.net/citygml/cityfurniture/1.0"
xmlns:app="http://www.opengis.net/citygml/appearance/1.0" xmlns:tex="http://www.opengis.net/citygml/texturedsurface/1.0"
xmlns:smil20="http://www.w3.org/2001/SMIL20/" xmlns:xAL="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"
xmlns:bldg="http://www.opengis.net/citygml/building/1.0" xmlns:dem="http://www.opengis.net/citygml/relief/1.0"
xmlns:veg="http://www.opengis.net/citygml/vegetation/1.0" xmlns:gen="http://www.opengis.net/citygml/generics/1.0"
xsi:schemaLocation="http://www.opengis.net/citygml/landuse/1.0 http://schemas.opengis.net/citygml/landuse/1.0/landUse.xsd http://www.opengis.net/citygml/cityfurniture/1.0 http://schemas.opengis.net/citygml/cityfurniture/1.0/cityFurniture.xsd http://www.opengis.net/citygml/appearance/1.0 http://schemas.opengis.net/citygml/appearance/1.0/appearance.xsd http://www.opengis.net/citygml/texturedsurface/1.0 http://schemas.opengis.net/citygml/texturedsurface/1.0/texturedSurface.xsd http://www.opengis.net/citygml/transportation/1.0 http://schemas.opengis.net/citygml/transportation/1.0/transportation.xsd http://www.opengis.net/citygml/waterbody/1.0 http://schemas.opengis.net/citygml/waterbody/1.0/waterBody.xsd http://www.opengis.net/citygml/building/1.0 http://schemas.opengis.net/citygml/building/1.0/building.xsd http://www.opengis.net/citygml/relief/1.0 http://schemas.opengis.net/citygml/relief/1.0/relief.xsd http://www.opengis.net/citygml/vegetation/1.0 http://schemas.opengis.net/citygml/vegetation/1.0/vegetation.xsd http://www.opengis.net/citygml/cityobjectgroup/1.0 http://schemas.opengis.net/citygml/cityobjectgroup/1.0/cityObjectGroup.xsd http://www.opengis.net/citygml/generics/1.0 http://schemas.opengis.net/citygml/generics/1.0/generics.xsd">
<!--
Coors, 22.12.2010
Polygon p_r_1 has three points only
should be detected by C-LR-1
Polygon p_w_4 and p_w_5 have four points, should be ok.
-->
<cityObjectMember>
<bldg:Building gml:id="Example-C-LR-1">
<creationDate>2010-12-22</creationDate>
<bldg:lod1MultiSurface>
<gml:MultiSurface>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_1">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 0.00 0.00
2.00 0.00 0.00
2.00 0.00 3.00
0.00 0.00 3.00
0.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_2">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
2.00 0.00 0.00
2.00 2.00 0.00
2.00 2.00 3.00
2.00 0.00 3.00
2.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_3">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
2.00 2.00 0.00
0.00 2.00 0.00
0.00 2.00 3.00
2.00 2.00 3.00
2.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_4">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 2.00 0.00
0.00 0.00 0.00
0.00 0.00 3.00
0.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_w_5">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 2.00 0.00
0.00 0.00 3.00
0.00 2.00 3.00
0.00 2.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_g_1">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 0.00 0.00
0.00 2.00 0.00
2.00 2.00 0.00
2.00 0.00 0.00
0.00 0.00 0.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
<gml:surfaceMember>
<gml:Polygon gml:id="p_r_1">
<gml:exterior>
<gml:LinearRing>
<gml:posList>
0.00 0.00 3.00
2.00 0.00 3.00
0.00 0.00 3.00
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</bldg:lod1MultiSurface>
</bldg:Building>
</cityObjectMember>
</CityModel>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment