Commit 297334ab authored by Matthias Betz's avatar Matthias Betz
Browse files

Add design spec for OpenGL 3D view



Replaces the JavaFX SubScene/MeshView rendering with an OpenGL viewport
(openglfx-jogl, GL 3.3 core), single global VBO, GPU color-picking, and
baked fake shading. Windows/Linux targets; JavaFX 3D path removed.

Co-Authored-By: default avatarClaude Opus 4.8 <noreply@anthropic.com>
parents 5c2847ef bd40b396
...@@ -34,6 +34,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType; ...@@ -34,6 +34,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType;
import de.hft.stuttgart.citydoctor2.datastructure.Lod; import de.hft.stuttgart.citydoctor2.datastructure.Lod;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon; import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.datastructure.Vertex; import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation;
/** /**
* *
...@@ -44,7 +45,7 @@ public class PolygonSameOrientationCheckTest { ...@@ -44,7 +45,7 @@ public class PolygonSameOrientationCheckTest {
@Test @Test
public void testSameOrientation() { public void testSameOrientation() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Vertex v0 = GeometryTestUtils.createVertex(0, 0, 0, geom); Vertex v0 = GeometryTestUtils.createVertex(0, 0, 0, geom);
Vertex v1 = GeometryTestUtils.createVertex(6, 0, 0, geom); Vertex v1 = GeometryTestUtils.createVertex(6, 0, 0, geom);
...@@ -76,7 +77,7 @@ public class PolygonSameOrientationCheckTest { ...@@ -76,7 +77,7 @@ public class PolygonSameOrientationCheckTest {
@Test @Test
public void testGoodPoly() { public void testGoodPoly() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Vertex v0 = GeometryTestUtils.createVertex(0, 0, 0, geom); Vertex v0 = GeometryTestUtils.createVertex(0, 0, 0, geom);
Vertex v1 = GeometryTestUtils.createVertex(6, 0, 0, geom); Vertex v1 = GeometryTestUtils.createVertex(6, 0, 0, geom);
......
...@@ -33,6 +33,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType; ...@@ -33,6 +33,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType;
import de.hft.stuttgart.citydoctor2.datastructure.Lod; import de.hft.stuttgart.citydoctor2.datastructure.Lod;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon; import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.datastructure.Vertex; import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation;
/** /**
* *
...@@ -45,7 +46,7 @@ public class PolygonSelfIntCheckTest { ...@@ -45,7 +46,7 @@ public class PolygonSelfIntCheckTest {
@Test @Test
public void testPolygonInteriorIntersectExterior() { public void testPolygonInteriorIntersectExterior() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
geom.addPolygon(poly); geom.addPolygon(poly);
...@@ -95,7 +96,7 @@ public class PolygonSelfIntCheckTest { ...@@ -95,7 +96,7 @@ public class PolygonSelfIntCheckTest {
@Test @Test
public void testPolygonGood() { public void testPolygonGood() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
geom.addPolygon(poly); geom.addPolygon(poly);
...@@ -143,7 +144,7 @@ public class PolygonSelfIntCheckTest { ...@@ -143,7 +144,7 @@ public class PolygonSelfIntCheckTest {
@Test @Test
public void test2InteriorRingsIntersecting() { public void test2InteriorRingsIntersecting() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
geom.addPolygon(poly); geom.addPolygon(poly);
...@@ -211,7 +212,7 @@ public class PolygonSelfIntCheckTest { ...@@ -211,7 +212,7 @@ public class PolygonSelfIntCheckTest {
@Test @Test
public void test2InteriorRingsNotIntersecting() { public void test2InteriorRingsNotIntersecting() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
geom.addPolygon(poly); geom.addPolygon(poly);
......
...@@ -38,6 +38,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType; ...@@ -38,6 +38,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType;
import de.hft.stuttgart.citydoctor2.datastructure.Lod; import de.hft.stuttgart.citydoctor2.datastructure.Lod;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon; import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.datastructure.Vertex; import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation;
import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration; import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
/** /**
...@@ -49,7 +50,7 @@ public class RingSelfIntCheckTest { ...@@ -49,7 +50,7 @@ public class RingSelfIntCheckTest {
@Test @Test
public void testIntersect() { public void testIntersect() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
geom.addPolygon(poly); geom.addPolygon(poly);
...@@ -88,7 +89,7 @@ public class RingSelfIntCheckTest { ...@@ -88,7 +89,7 @@ public class RingSelfIntCheckTest {
@Test @Test
public void testNonIntersect() { public void testNonIntersect() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
geom.addPolygon(poly); geom.addPolygon(poly);
...@@ -121,7 +122,7 @@ public class RingSelfIntCheckTest { ...@@ -121,7 +122,7 @@ public class RingSelfIntCheckTest {
@Test @Test
public void testTouching() { public void testTouching() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
geom.addPolygon(poly); geom.addPolygon(poly);
...@@ -159,7 +160,7 @@ public class RingSelfIntCheckTest { ...@@ -159,7 +160,7 @@ public class RingSelfIntCheckTest {
@Test @Test
public void testNotTouching() { public void testNotTouching() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
geom.addPolygon(poly); geom.addPolygon(poly);
......
...@@ -35,7 +35,7 @@ public class SolidSelfIntCheckFalsePositiveBigMeshTest { ...@@ -35,7 +35,7 @@ public class SolidSelfIntCheckFalsePositiveBigMeshTest {
CityDoctorModel m = CityGmlParser.parseCityGmlFile(gml_filepath, config.getParserConfiguration()); CityDoctorModel m = CityGmlParser.parseCityGmlFile(gml_filepath, config.getParserConfiguration());
Checker c = new Checker(config, m); Checker c = new Checker(config, m);
c.runChecks(); c.runChecks();
Building building = m.getBuildings().get(0); Building building = m.getBuildings().toList().get(0);
/* /*
* The examples have no actual self-intersections, but can contain other actual model defects. * The examples have no actual self-intersections, but can contain other actual model defects.
* If an error is detected, it is thus required to check if the * If an error is detected, it is thus required to check if the
......
...@@ -25,14 +25,18 @@ import static org.junit.Assert.assertNotNull; ...@@ -25,14 +25,18 @@ import static org.junit.Assert.assertNotNull;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.check.CheckResult; import de.hft.stuttgart.citydoctor2.check.CheckResult;
import de.hft.stuttgart.citydoctor2.check.Checker; import de.hft.stuttgart.citydoctor2.check.Checker;
import de.hft.stuttgart.citydoctor2.check.ResultStatus; import de.hft.stuttgart.citydoctor2.check.ResultStatus;
import de.hft.stuttgart.citydoctor2.check.ValidationConfiguration; import de.hft.stuttgart.citydoctor2.check.ValidationConfiguration;
import de.hft.stuttgart.citydoctor2.check.error.NonPlanarPolygonDistancePlaneError;
import de.hft.stuttgart.citydoctor2.checks.util.GeometryTestUtils; import de.hft.stuttgart.citydoctor2.checks.util.GeometryTestUtils;
import de.hft.stuttgart.citydoctor2.datastructure.Building; import de.hft.stuttgart.citydoctor2.datastructure.Building;
import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel; import de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel;
import de.hft.stuttgart.citydoctor2.datastructure.ConcretePolygon;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry; import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation;
import de.hft.stuttgart.citydoctor2.datastructure.GeometryType; import de.hft.stuttgart.citydoctor2.datastructure.GeometryType;
import de.hft.stuttgart.citydoctor2.datastructure.Lod; import de.hft.stuttgart.citydoctor2.datastructure.Lod;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException; import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
...@@ -45,6 +49,22 @@ import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException; ...@@ -45,6 +49,22 @@ import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
* *
*/ */
public class SolidSelfIntCheckTest { public class SolidSelfIntCheckTest {
@Test
public void testDependencyChecking() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
ConcretePolygon p = new ConcretePolygon();
geom.addPolygon(p);
NonPlanarPolygonDistancePlaneError err = new NonPlanarPolygonDistancePlaneError(p, 2, null, null);
CheckResult cr = new CheckResult(CheckId.C_GE_P_NON_PLANAR, ResultStatus.ERROR, err);
p.addCheckResult(cr);
SolidSelfIntCheck selfIntCheck = new SolidSelfIntCheck();
boolean canExecute = selfIntCheck.canExecute(geom);
assertFalse(canExecute);
}
@Test @Test
public void testGoodGeometry() { public void testGoodGeometry() {
...@@ -75,7 +95,7 @@ public class SolidSelfIntCheckTest { ...@@ -75,7 +95,7 @@ public class SolidSelfIntCheckTest {
CityDoctorModel m = CityGmlParser.parseCityGmlFile("src/test/resources/SolidSelfIntTest1.gml", config.getParserConfiguration()); CityDoctorModel m = CityGmlParser.parseCityGmlFile("src/test/resources/SolidSelfIntTest1.gml", config.getParserConfiguration());
Checker c = new Checker(config, m); Checker c = new Checker(config, m);
c.runChecks(); c.runChecks();
assertFalse(m.getBuildings().get(0).containsAnyError()); assertFalse(m.getBuildings().toList().get(0).containsAnyError());
} }
...@@ -85,7 +105,7 @@ public class SolidSelfIntCheckTest { ...@@ -85,7 +105,7 @@ public class SolidSelfIntCheckTest {
CityDoctorModel m = CityGmlParser.parseCityGmlFile(gml_filepath, config.getParserConfiguration()); CityDoctorModel m = CityGmlParser.parseCityGmlFile(gml_filepath, config.getParserConfiguration());
Checker c = new Checker(config, m); Checker c = new Checker(config, m);
c.runChecks(); c.runChecks();
Building building = m.getBuildings().get(0); Building building = m.getBuildings().toList().get(0);
/* /*
* The examples have no actual self-intersections, but can contain other actual model defects. * The examples have no actual self-intersections, but can contain other actual model defects.
* If an error is detected, it is thus required to check if the * If an error is detected, it is thus required to check if the
......
...@@ -38,6 +38,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType; ...@@ -38,6 +38,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType;
import de.hft.stuttgart.citydoctor2.datastructure.Lod; import de.hft.stuttgart.citydoctor2.datastructure.Lod;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon; import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.datastructure.Vertex; import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation;
import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration; import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
/** /**
...@@ -64,7 +65,7 @@ public class IsWallCheckTest { ...@@ -64,7 +65,7 @@ public class IsWallCheckTest {
Polygon p = new ConcretePolygon(); Polygon p = new ConcretePolygon();
p.setExteriorRing(lr); p.setExteriorRing(lr);
Geometry geom = new Geometry(GeometryType.MULTI_SURFACE, Lod.LOD2); Geometry geom = new Geometry(GeometryType.MULTI_SURFACE, Lod.LOD2, Orientation.OUTWARD);
geom.addPolygon(p); geom.addPolygon(p);
BoundarySurface bs = new BoundarySurface(null); BoundarySurface bs = new BoundarySurface(null);
...@@ -97,7 +98,7 @@ public class IsWallCheckTest { ...@@ -97,7 +98,7 @@ public class IsWallCheckTest {
Polygon p = new ConcretePolygon(); Polygon p = new ConcretePolygon();
p.setExteriorRing(lr); p.setExteriorRing(lr);
Geometry geom = new Geometry(GeometryType.MULTI_SURFACE, Lod.LOD2); Geometry geom = new Geometry(GeometryType.MULTI_SURFACE, Lod.LOD2, Orientation.OUTWARD);
geom.addPolygon(p); geom.addPolygon(p);
BoundarySurface bs = new BoundarySurface(null); BoundarySurface bs = new BoundarySurface(null);
...@@ -129,7 +130,7 @@ public class IsWallCheckTest { ...@@ -129,7 +130,7 @@ public class IsWallCheckTest {
Polygon p = new ConcretePolygon(); Polygon p = new ConcretePolygon();
p.setExteriorRing(lr); p.setExteriorRing(lr);
Geometry geom = new Geometry(GeometryType.MULTI_SURFACE, Lod.LOD2); Geometry geom = new Geometry(GeometryType.MULTI_SURFACE, Lod.LOD2, Orientation.OUTWARD);
geom.addPolygon(p); geom.addPolygon(p);
BoundarySurface bs = new BoundarySurface(null); BoundarySurface bs = new BoundarySurface(null);
...@@ -162,7 +163,7 @@ public class IsWallCheckTest { ...@@ -162,7 +163,7 @@ public class IsWallCheckTest {
Polygon p = new ConcretePolygon(); Polygon p = new ConcretePolygon();
p.setExteriorRing(lr); p.setExteriorRing(lr);
Geometry geom = new Geometry(GeometryType.MULTI_SURFACE, Lod.LOD2); Geometry geom = new Geometry(GeometryType.MULTI_SURFACE, Lod.LOD2, Orientation.OUTWARD);
geom.addPolygon(p); geom.addPolygon(p);
BoundarySurface bs = new BoundarySurface(null); BoundarySurface bs = new BoundarySurface(null);
......
...@@ -20,12 +20,13 @@ import de.hft.stuttgart.citydoctor2.datastructure.Geometry; ...@@ -20,12 +20,13 @@ import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
import de.hft.stuttgart.citydoctor2.datastructure.GeometryType; import de.hft.stuttgart.citydoctor2.datastructure.GeometryType;
import de.hft.stuttgart.citydoctor2.datastructure.Lod; import de.hft.stuttgart.citydoctor2.datastructure.Lod;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon; import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation;
public class PolygonWithoutSurfaceCheckTest { public class PolygonWithoutSurfaceCheckTest {
@Test @Test
public void testPolygonWithoutSurface() { public void testPolygonWithoutSurface() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
geom.addPolygon(poly); geom.addPolygon(poly);
PolygonWithoutSurfaceCheck check = new PolygonWithoutSurfaceCheck(); PolygonWithoutSurfaceCheck check = new PolygonWithoutSurfaceCheck();
...@@ -44,7 +45,7 @@ public class PolygonWithoutSurfaceCheckTest { ...@@ -44,7 +45,7 @@ public class PolygonWithoutSurfaceCheckTest {
@Test @Test
public void testPolygonWithSurface() { public void testPolygonWithSurface() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
BoundarySurface bs = new BoundarySurface(null); BoundarySurface bs = new BoundarySurface(null);
bs.addGeometry(geom); bs.addGeometry(geom);
...@@ -61,7 +62,7 @@ public class PolygonWithoutSurfaceCheckTest { ...@@ -61,7 +62,7 @@ public class PolygonWithoutSurfaceCheckTest {
@Test @Test
public void testPolygonWithWrongLod() { public void testPolygonWithWrongLod() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
BoundarySurface bs = new BoundarySurface(null); BoundarySurface bs = new BoundarySurface(null);
bs.addGeometry(geom); bs.addGeometry(geom);
......
...@@ -30,6 +30,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType; ...@@ -30,6 +30,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType;
import de.hft.stuttgart.citydoctor2.datastructure.Lod; import de.hft.stuttgart.citydoctor2.datastructure.Lod;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon; import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.datastructure.Vertex; import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation;
/** /**
* *
...@@ -39,7 +40,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Vertex; ...@@ -39,7 +40,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
public class GeometryTestUtils { public class GeometryTestUtils {
public static Geometry createGoodGeometry() { public static Geometry createGoodGeometry() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Vertex v0 = createVertex(0, 0, 0, geom); Vertex v0 = createVertex(0, 0, 0, geom);
Vertex v1 = createVertex(10, 0, 0, geom); Vertex v1 = createVertex(10, 0, 0, geom);
...@@ -65,7 +66,7 @@ public class GeometryTestUtils { ...@@ -65,7 +66,7 @@ public class GeometryTestUtils {
} }
public static Geometry createBadGeometry() { public static Geometry createBadGeometry() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Vertex v0 = createVertex(0, 0, 0, geom); Vertex v0 = createVertex(0, 0, 0, geom);
Vertex v1 = createVertex(10, 0, 0, geom); Vertex v1 = createVertex(10, 0, 0, geom);
......
...@@ -37,6 +37,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType; ...@@ -37,6 +37,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LinearRing.LinearRingType;
import de.hft.stuttgart.citydoctor2.datastructure.Lod; import de.hft.stuttgart.citydoctor2.datastructure.Lod;
import de.hft.stuttgart.citydoctor2.datastructure.Polygon; import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
import de.hft.stuttgart.citydoctor2.datastructure.Vertex; import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation;
import de.hft.stuttgart.citydoctor2.math.Segment3d; import de.hft.stuttgart.citydoctor2.math.Segment3d;
import de.hft.stuttgart.citydoctor2.math.Vector3d; import de.hft.stuttgart.citydoctor2.math.Vector3d;
import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration; import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
...@@ -56,7 +57,9 @@ public class SelfIntersectionUtilTest { ...@@ -56,7 +57,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 0); Vertex v2 = new Vertex(10, 10, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -70,6 +73,7 @@ public class SelfIntersectionUtilTest { ...@@ -70,6 +73,7 @@ public class SelfIntersectionUtilTest {
Vertex v5 = new Vertex(10, 10, 1); Vertex v5 = new Vertex(10, 10, 1);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
...@@ -89,7 +93,9 @@ public class SelfIntersectionUtilTest { ...@@ -89,7 +93,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 0); Vertex v2 = new Vertex(10, 10, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -103,6 +109,7 @@ public class SelfIntersectionUtilTest { ...@@ -103,6 +109,7 @@ public class SelfIntersectionUtilTest {
Vertex v5 = new Vertex(10, 10, -1); Vertex v5 = new Vertex(10, 10, -1);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
...@@ -122,7 +129,9 @@ public class SelfIntersectionUtilTest { ...@@ -122,7 +129,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 0); Vertex v2 = new Vertex(10, 10, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -136,6 +145,7 @@ public class SelfIntersectionUtilTest { ...@@ -136,6 +145,7 @@ public class SelfIntersectionUtilTest {
Vertex v5 = new Vertex(7, 7, -5); Vertex v5 = new Vertex(7, 7, -5);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
...@@ -158,7 +168,9 @@ public class SelfIntersectionUtilTest { ...@@ -158,7 +168,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 0); Vertex v2 = new Vertex(10, 10, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -172,6 +184,7 @@ public class SelfIntersectionUtilTest { ...@@ -172,6 +184,7 @@ public class SelfIntersectionUtilTest {
Vertex v5 = new Vertex(10, 10, 0); Vertex v5 = new Vertex(10, 10, 0);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
...@@ -191,7 +204,9 @@ public class SelfIntersectionUtilTest { ...@@ -191,7 +204,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 0); Vertex v2 = new Vertex(10, 10, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -205,6 +220,7 @@ public class SelfIntersectionUtilTest { ...@@ -205,6 +220,7 @@ public class SelfIntersectionUtilTest {
Vertex v5 = new Vertex(7, 7, -5); Vertex v5 = new Vertex(7, 7, -5);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
...@@ -232,7 +248,9 @@ public class SelfIntersectionUtilTest { ...@@ -232,7 +248,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 0); Vertex v2 = new Vertex(10, 10, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -246,6 +264,7 @@ public class SelfIntersectionUtilTest { ...@@ -246,6 +264,7 @@ public class SelfIntersectionUtilTest {
Vertex v5 = new Vertex(7, 7, -5); Vertex v5 = new Vertex(7, 7, -5);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
...@@ -275,7 +294,9 @@ public class SelfIntersectionUtilTest { ...@@ -275,7 +294,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 0); Vertex v2 = new Vertex(10, 10, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -291,6 +312,7 @@ public class SelfIntersectionUtilTest { ...@@ -291,6 +312,7 @@ public class SelfIntersectionUtilTest {
Vertex v7 = new Vertex(9, 2, -3); Vertex v7 = new Vertex(9, 2, -3);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
...@@ -330,7 +352,9 @@ public class SelfIntersectionUtilTest { ...@@ -330,7 +352,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 0); Vertex v2 = new Vertex(10, 10, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -358,6 +382,7 @@ public class SelfIntersectionUtilTest { ...@@ -358,6 +382,7 @@ public class SelfIntersectionUtilTest {
Vertex v7 = new Vertex(9, 2, -3); Vertex v7 = new Vertex(9, 2, -3);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
...@@ -405,7 +430,9 @@ public class SelfIntersectionUtilTest { ...@@ -405,7 +430,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 0); Vertex v2 = new Vertex(10, 10, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -433,6 +460,7 @@ public class SelfIntersectionUtilTest { ...@@ -433,6 +460,7 @@ public class SelfIntersectionUtilTest {
Vertex v7 = new Vertex(9, 2, -3); Vertex v7 = new Vertex(9, 2, -3);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
...@@ -464,7 +492,9 @@ public class SelfIntersectionUtilTest { ...@@ -464,7 +492,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 0); Vertex v2 = new Vertex(10, 10, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -478,6 +508,7 @@ public class SelfIntersectionUtilTest { ...@@ -478,6 +508,7 @@ public class SelfIntersectionUtilTest {
Vertex v5 = new Vertex(10, 10, 0); Vertex v5 = new Vertex(10, 10, 0);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
r2.addVertex(v3); r2.addVertex(v3);
...@@ -496,7 +527,9 @@ public class SelfIntersectionUtilTest { ...@@ -496,7 +527,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 0); Vertex v2 = new Vertex(10, 10, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -510,6 +543,7 @@ public class SelfIntersectionUtilTest { ...@@ -510,6 +543,7 @@ public class SelfIntersectionUtilTest {
Vertex v5 = new Vertex(9, 10, 0); Vertex v5 = new Vertex(9, 10, 0);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
r2.addVertex(v3); r2.addVertex(v3);
...@@ -528,7 +562,9 @@ public class SelfIntersectionUtilTest { ...@@ -528,7 +562,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 0); Vertex v2 = new Vertex(10, 10, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -542,6 +578,7 @@ public class SelfIntersectionUtilTest { ...@@ -542,6 +578,7 @@ public class SelfIntersectionUtilTest {
Vertex v5 = new Vertex(10, 11, 0); Vertex v5 = new Vertex(10, 11, 0);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
r2.addVertex(v3); r2.addVertex(v3);
...@@ -560,7 +597,9 @@ public class SelfIntersectionUtilTest { ...@@ -560,7 +597,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 10, 10); Vertex v2 = new Vertex(10, 10, 10);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -575,6 +614,7 @@ public class SelfIntersectionUtilTest { ...@@ -575,6 +614,7 @@ public class SelfIntersectionUtilTest {
Vertex v6 = new Vertex(8, 5, 5); Vertex v6 = new Vertex(8, 5, 5);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
r2.addVertex(v3); r2.addVertex(v3);
...@@ -599,7 +639,9 @@ public class SelfIntersectionUtilTest { ...@@ -599,7 +639,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 0, 0); Vertex v1 = new Vertex(10, 0, 0);
Vertex v2 = new Vertex(10, 0, 10); Vertex v2 = new Vertex(10, 0, 10);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -614,6 +656,7 @@ public class SelfIntersectionUtilTest { ...@@ -614,6 +656,7 @@ public class SelfIntersectionUtilTest {
Vertex v6 = new Vertex(8, 0, 5); Vertex v6 = new Vertex(8, 0, 5);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
r2.addVertex(v3); r2.addVertex(v3);
...@@ -638,7 +681,9 @@ public class SelfIntersectionUtilTest { ...@@ -638,7 +681,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(0, 10, 0); Vertex v1 = new Vertex(0, 10, 0);
Vertex v2 = new Vertex(0, 10, 10); Vertex v2 = new Vertex(0, 10, 10);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -653,6 +698,7 @@ public class SelfIntersectionUtilTest { ...@@ -653,6 +698,7 @@ public class SelfIntersectionUtilTest {
Vertex v6 = new Vertex(0, 8, 5); Vertex v6 = new Vertex(0, 8, 5);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
r2.addVertex(v3); r2.addVertex(v3);
...@@ -677,7 +723,9 @@ public class SelfIntersectionUtilTest { ...@@ -677,7 +723,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 10, 0); Vertex v1 = new Vertex(10, 10, 0);
Vertex v2 = new Vertex(10, 0, 0); Vertex v2 = new Vertex(10, 0, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -692,6 +740,7 @@ public class SelfIntersectionUtilTest { ...@@ -692,6 +740,7 @@ public class SelfIntersectionUtilTest {
Vertex v6 = new Vertex(8, 2, 0); Vertex v6 = new Vertex(8, 2, 0);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
r2.addVertex(v3); r2.addVertex(v3);
...@@ -736,7 +785,9 @@ public class SelfIntersectionUtilTest { ...@@ -736,7 +785,9 @@ public class SelfIntersectionUtilTest {
Vertex v1 = new Vertex(10, 10, 0); Vertex v1 = new Vertex(10, 10, 0);
Vertex v2 = new Vertex(10, 0, 0); Vertex v2 = new Vertex(10, 0, 0);
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p1 = new ConcretePolygon(); Polygon p1 = new ConcretePolygon();
geom.addPolygon(p1);
LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r1 = new LinearRing(LinearRingType.EXTERIOR);
p1.setExteriorRing(r1); p1.setExteriorRing(r1);
...@@ -751,6 +802,7 @@ public class SelfIntersectionUtilTest { ...@@ -751,6 +802,7 @@ public class SelfIntersectionUtilTest {
Vertex v6 = new Vertex(8, 2, 0); Vertex v6 = new Vertex(8, 2, 0);
Polygon p2 = new ConcretePolygon(); Polygon p2 = new ConcretePolygon();
geom.addPolygon(p2);
LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR); LinearRing r2 = new LinearRing(LinearRingType.EXTERIOR);
p2.setExteriorRing(r2); p2.setExteriorRing(r2);
r2.addVertex(v3); r2.addVertex(v3);
...@@ -806,7 +858,7 @@ public class SelfIntersectionUtilTest { ...@@ -806,7 +858,7 @@ public class SelfIntersectionUtilTest {
@Test @Test
public void testIsSimpleGood() { public void testIsSimpleGood() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
geom.addPolygon(poly); geom.addPolygon(poly);
...@@ -837,7 +889,7 @@ public class SelfIntersectionUtilTest { ...@@ -837,7 +889,7 @@ public class SelfIntersectionUtilTest {
@Test @Test
public void testIsSimpleFail() { public void testIsSimpleFail() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
geom.addPolygon(poly); geom.addPolygon(poly);
...@@ -867,7 +919,7 @@ public class SelfIntersectionUtilTest { ...@@ -867,7 +919,7 @@ public class SelfIntersectionUtilTest {
@Test @Test
public void testIsSimpleGood2() { public void testIsSimpleGood2() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1); Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD1, Orientation.OUTWARD);
Polygon poly = new ConcretePolygon(); Polygon poly = new ConcretePolygon();
geom.addPolygon(poly); geom.addPolygon(poly);
......
...@@ -48,7 +48,7 @@ public class AllPolygonWrongOrientedTest { ...@@ -48,7 +48,7 @@ public class AllPolygonWrongOrientedTest {
Checker c = new Checker(config, model); Checker c = new Checker(config, model);
c.runChecks(); c.runChecks();
Building b = model.getBuildings().get(0); Building b = model.getBuildings().toList().get(0);
assertFalse(b.containsError(CheckId.C_GE_S_ALL_POLYGONS_WRONG_ORIENTATION)); assertFalse(b.containsError(CheckId.C_GE_S_ALL_POLYGONS_WRONG_ORIENTATION));
} }
......
...@@ -51,7 +51,7 @@ public class ConCompCheckTest extends TestCleanUp { ...@@ -51,7 +51,7 @@ public class ConCompCheckTest extends TestCleanUp {
Checker c = new Checker(m); Checker c = new Checker(m);
c.runChecks(); c.runChecks();
Geometry geom = m.getBuildings().get(0).getGeometries().get(0); Geometry geom = m.getBuildings().toList().get(0).getGeometries().get(0);
CheckResult cr = geom.getCheckResult(CheckId.C_GE_S_MULTIPLE_CONNECTED_COMPONENTS); CheckResult cr = geom.getCheckResult(CheckId.C_GE_S_MULTIPLE_CONNECTED_COMPONENTS);
assertNotNull(cr); assertNotNull(cr);
assertEquals(ResultStatus.ERROR, cr.getResultStatus()); assertEquals(ResultStatus.ERROR, cr.getResultStatus());
...@@ -65,7 +65,7 @@ public class ConCompCheckTest extends TestCleanUp { ...@@ -65,7 +65,7 @@ public class ConCompCheckTest extends TestCleanUp {
Checker c = new Checker(m); Checker c = new Checker(m);
c.runChecks(); c.runChecks();
Geometry geom = m.getBuildings().get(0).getGeometries().get(0); Geometry geom = m.getBuildings().toList().get(0).getGeometries().get(0);
CheckResult cr = geom.getCheckResult(CheckId.C_GE_S_MULTIPLE_CONNECTED_COMPONENTS); CheckResult cr = geom.getCheckResult(CheckId.C_GE_S_MULTIPLE_CONNECTED_COMPONENTS);
assertNotNull(cr); assertNotNull(cr);
assertEquals(ResultStatus.ERROR, cr.getResultStatus()); assertEquals(ResultStatus.ERROR, cr.getResultStatus());
......
...@@ -79,7 +79,7 @@ public class DupPointsCheckTest { ...@@ -79,7 +79,7 @@ public class DupPointsCheckTest {
@Test @Test
public void testDupPoints3() throws CityGmlParseException, IOException, InvalidGmlFileException { public void testDupPoints3() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel m = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml"); CityDoctorModel m = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
for (Polygon p : m.getBuildings().get(0).getGeometries().get(0).getPolygons()) { for (Polygon p : m.getBuildings().toList().get(0).getGeometries().get(0).getPolygons()) {
LinearRing r = p.getExteriorRing(); LinearRing r = p.getExteriorRing();
CheckResult cr = r.getCheckResult(CheckId.C_GE_R_DUPLICATE_POINT); CheckResult cr = r.getCheckResult(CheckId.C_GE_R_DUPLICATE_POINT);
assertEquals(ResultStatus.OK, cr.getResultStatus()); assertEquals(ResultStatus.OK, cr.getResultStatus());
......
...@@ -43,7 +43,7 @@ public class HoleOutsideSystemTest { ...@@ -43,7 +43,7 @@ public class HoleOutsideSystemTest {
@Test @Test
public void testHoleOutside1() throws CityGmlParseException, IOException, InvalidGmlFileException { public void testHoleOutside1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0001-T0002.gml"); 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()) { for (Polygon p : c.getBuildings().toList().get(0).getGeometries().get(0).getPolygons()) {
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_HOLE_OUTSIDE); CheckResult cr = p.getCheckResult(CheckId.C_GE_P_HOLE_OUTSIDE);
assertEquals(ResultStatus.OK, cr.getResultStatus()); assertEquals(ResultStatus.OK, cr.getResultStatus());
} }
......
...@@ -43,7 +43,7 @@ public class InnerRingsNestedSystemTest { ...@@ -43,7 +43,7 @@ public class InnerRingsNestedSystemTest {
@Test @Test
public void innerRingsNested1() throws CityGmlParseException, IOException, InvalidGmlFileException { public void innerRingsNested1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0001-T0002.gml"); 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()) { for (Polygon p : c.getBuildings().toList().get(0).getGeometries().get(0).getPolygons()) {
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_INNER_RINGS_NESTED); CheckResult cr = p.getCheckResult(CheckId.C_GE_P_INNER_RINGS_NESTED);
assertEquals(ResultStatus.OK, cr.getResultStatus()); assertEquals(ResultStatus.OK, cr.getResultStatus());
} }
......
...@@ -43,7 +43,7 @@ public class InteriorDisconnectedSystemTest { ...@@ -43,7 +43,7 @@ public class InteriorDisconnectedSystemTest {
@Test @Test
public void testInteriorDisconnected1() throws CityGmlParseException, IOException, InvalidGmlFileException { public void testInteriorDisconnected1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0001-T0002.gml"); 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()) { for (Polygon p : c.getBuildings().toList().get(0).getGeometries().get(0).getPolygons()) {
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_INTERIOR_DISCONNECTED); CheckResult cr = p.getCheckResult(CheckId.C_GE_P_INTERIOR_DISCONNECTED);
assertEquals(ResultStatus.OK, cr.getResultStatus()); assertEquals(ResultStatus.OK, cr.getResultStatus());
} }
......
...@@ -43,7 +43,7 @@ public class MultipleComponentTest { ...@@ -43,7 +43,7 @@ public class MultipleComponentTest {
@Test @Test
public void testNoMultipleComponents() throws CityGmlParseException, IOException, InvalidGmlFileException { public void testNoMultipleComponents() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml"); CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0); Geometry g = c.getBuildings().toList().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_MULTIPLE_CONNECTED_COMPONENTS); CheckResult cr = g.getCheckResult(CheckId.C_GE_S_MULTIPLE_CONNECTED_COMPONENTS);
assertEquals(ResultStatus.OK, cr.getResultStatus()); assertEquals(ResultStatus.OK, cr.getResultStatus());
} }
...@@ -51,7 +51,7 @@ public class MultipleComponentTest { ...@@ -51,7 +51,7 @@ public class MultipleComponentTest {
@Test @Test
public void testMultipleComponents() throws CityGmlParseException, IOException, InvalidGmlFileException { public void testMultipleComponents() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0005-T0001.gml"); CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0005-T0001.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0); Geometry g = c.getBuildings().toList().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_MULTIPLE_CONNECTED_COMPONENTS); CheckResult cr = g.getCheckResult(CheckId.C_GE_S_MULTIPLE_CONNECTED_COMPONENTS);
assertEquals(ResultStatus.ERROR, cr.getResultStatus()); assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_S_MULTIPLE_CONNECTED_COMPONENTS, cr.getError().getErrorId()); assertEquals(ErrorId.GE_S_MULTIPLE_CONNECTED_COMPONENTS, cr.getError().getErrorId());
......
...@@ -46,7 +46,7 @@ public class NonManifoldEdgeSystemTest { ...@@ -46,7 +46,7 @@ public class NonManifoldEdgeSystemTest {
@Test @Test
public void testNonManifoldEdge1() throws CityGmlParseException, IOException, InvalidGmlFileException { public void testNonManifoldEdge1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml"); CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0); Geometry g = c.getBuildings().toList().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NON_MANIFOLD_EDGE); CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NON_MANIFOLD_EDGE);
assertEquals(ResultStatus.OK, cr.getResultStatus()); assertEquals(ResultStatus.OK, cr.getResultStatus());
} }
...@@ -59,7 +59,7 @@ public class NonManifoldEdgeSystemTest { ...@@ -59,7 +59,7 @@ public class NonManifoldEdgeSystemTest {
paramMap.put(RequirementId.R_GE_P_NON_PLANAR.toString(), parameter); paramMap.put(RequirementId.R_GE_P_NON_PLANAR.toString(), parameter);
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0004-T0001.gml", CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0004-T0001.gml",
paramMap); paramMap);
Geometry g = c.getBuildings().get(0).getGeometries().get(0); Geometry g = c.getBuildings().toList().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NON_MANIFOLD_EDGE); CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NON_MANIFOLD_EDGE);
assertEquals(ResultStatus.ERROR, cr.getResultStatus()); assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_S_NON_MANIFOLD_EDGE, cr.getError().getErrorId()); assertEquals(ErrorId.GE_S_NON_MANIFOLD_EDGE, cr.getError().getErrorId());
......
...@@ -43,7 +43,7 @@ public class NonManifoldVertexSystemTest { ...@@ -43,7 +43,7 @@ public class NonManifoldVertexSystemTest {
@Test @Test
public void testNonManifoldVertex1() throws CityGmlParseException, IOException, InvalidGmlFileException { public void testNonManifoldVertex1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml"); CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0); Geometry g = c.getBuildings().toList().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NON_MANIFOLD_VERTEX); CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NON_MANIFOLD_VERTEX);
assertEquals(ResultStatus.OK, cr.getResultStatus()); assertEquals(ResultStatus.OK, cr.getResultStatus());
} }
...@@ -51,7 +51,7 @@ public class NonManifoldVertexSystemTest { ...@@ -51,7 +51,7 @@ public class NonManifoldVertexSystemTest {
@Test @Test
public void testNonManifoldVertex2() throws CityGmlParseException, IOException, InvalidGmlFileException { public void testNonManifoldVertex2() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0003-T0001.gml"); CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0003-T0001.gml");
Geometry g = c.getBuildings().get(0).getGeometries().get(0); Geometry g = c.getBuildings().toList().get(0).getGeometries().get(0);
CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NON_MANIFOLD_VERTEX); CheckResult cr = g.getCheckResult(CheckId.C_GE_S_NON_MANIFOLD_VERTEX);
assertEquals(ResultStatus.ERROR, cr.getResultStatus()); assertEquals(ResultStatus.ERROR, cr.getResultStatus());
assertEquals(ErrorId.GE_S_NON_MANIFOLD_VERTEX, cr.getError().getErrorId()); assertEquals(ErrorId.GE_S_NON_MANIFOLD_VERTEX, cr.getError().getErrorId());
......
...@@ -80,7 +80,7 @@ public class NumPointsCheckTest { ...@@ -80,7 +80,7 @@ public class NumPointsCheckTest {
public void testNumPoints3() throws CityGmlParseException, IOException, InvalidGmlFileException { public void testNumPoints3() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml"); CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS.gml");
for (Polygon p : c.getBuildings().get(0).getGeometries().get(0).getPolygons()) { for (Polygon p : c.getBuildings().toList().get(0).getGeometries().get(0).getPolygons()) {
LinearRing r = p.getExteriorRing(); LinearRing r = p.getExteriorRing();
assertEquals(ResultStatus.OK, r.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS).getResultStatus()); assertEquals(ResultStatus.OK, r.getCheckResult(CheckId.C_GE_R_TOO_FEW_POINTS).getResultStatus());
} }
......
...@@ -43,7 +43,7 @@ public class OrientationSameSystemTest { ...@@ -43,7 +43,7 @@ public class OrientationSameSystemTest {
@Test @Test
public void testOrientationSame1() throws CityGmlParseException, IOException, InvalidGmlFileException { public void testOrientationSame1() throws CityGmlParseException, IOException, InvalidGmlFileException {
CityDoctorModel c = TestUtil.loadAndCheckCityModel("src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0001-T0002.gml"); 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()) { for (Polygon p : c.getBuildings().toList().get(0).getGeometries().get(0).getPolygons()) {
CheckResult cr = p.getCheckResult(CheckId.C_GE_P_ORIENTATION_RINGS_SAME); CheckResult cr = p.getCheckResult(CheckId.C_GE_P_ORIENTATION_RINGS_SAME);
assertEquals(ResultStatus.OK, cr.getResultStatus()); assertEquals(ResultStatus.OK, cr.getResultStatus());
} }
......
Supports Markdown
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