Commit 183b4ce7 authored by Luna Riegel's avatar Luna Riegel
Browse files

Merge branch 'dev' into dev_advanced_db_management

parents 8e7a9551 d3ca6500
...@@ -40,8 +40,6 @@ import org.locationtech.jts.geom.impl.CoordinateArraySequence; ...@@ -40,8 +40,6 @@ import org.locationtech.jts.geom.impl.CoordinateArraySequence;
import org.locationtech.jts.operation.overlay.OverlayOp; import org.locationtech.jts.operation.overlay.OverlayOp;
import org.locationtech.jts.operation.overlay.snap.SnapIfNeededOverlayOp; import org.locationtech.jts.operation.overlay.snap.SnapIfNeededOverlayOp;
import Jama.EigenvalueDecomposition;
import Jama.Matrix;
import de.hft.stuttgart.citydoctor2.check.GeometrySelfIntersection; import de.hft.stuttgart.citydoctor2.check.GeometrySelfIntersection;
import de.hft.stuttgart.citydoctor2.datastructure.ConcretePolygon; import de.hft.stuttgart.citydoctor2.datastructure.ConcretePolygon;
import de.hft.stuttgart.citydoctor2.datastructure.Geometry; import de.hft.stuttgart.citydoctor2.datastructure.Geometry;
...@@ -53,10 +51,8 @@ import de.hft.stuttgart.citydoctor2.edge.EdgePolygon; ...@@ -53,10 +51,8 @@ import de.hft.stuttgart.citydoctor2.edge.EdgePolygon;
import de.hft.stuttgart.citydoctor2.edge.IntersectPlanarPolygons; import de.hft.stuttgart.citydoctor2.edge.IntersectPlanarPolygons;
import de.hft.stuttgart.citydoctor2.edge.MeshSurface; import de.hft.stuttgart.citydoctor2.edge.MeshSurface;
import de.hft.stuttgart.citydoctor2.edge.PolygonPolygonIntersection; import de.hft.stuttgart.citydoctor2.edge.PolygonPolygonIntersection;
import de.hft.stuttgart.citydoctor2.math.CovarianceMatrix;
import de.hft.stuttgart.citydoctor2.math.MovedPolygon; import de.hft.stuttgart.citydoctor2.math.MovedPolygon;
import de.hft.stuttgart.citydoctor2.math.MovedRing; import de.hft.stuttgart.citydoctor2.math.MovedRing;
import de.hft.stuttgart.citydoctor2.math.OrthogonalRegressionPlane;
import de.hft.stuttgart.citydoctor2.math.Plane; import de.hft.stuttgart.citydoctor2.math.Plane;
import de.hft.stuttgart.citydoctor2.math.PlaneSegmentIntersection; import de.hft.stuttgart.citydoctor2.math.PlaneSegmentIntersection;
import de.hft.stuttgart.citydoctor2.math.PlaneSegmentIntersection.Type; import de.hft.stuttgart.citydoctor2.math.PlaneSegmentIntersection.Type;
...@@ -95,18 +91,7 @@ public class SelfIntersectionUtil { ...@@ -95,18 +91,7 @@ public class SelfIntersectionUtil {
TesselatedPolygon tessPolygon = EarcutTesselator.tesselatePolygon(p); TesselatedPolygon tessPolygon = EarcutTesselator.tesselatePolygon(p);
for (Iterator<Triangle3d> iterator = tessPolygon.getTriangles().iterator(); iterator.hasNext();) { for (Iterator<Triangle3d> iterator = tessPolygon.getTriangles().iterator(); iterator.hasNext();) {
Triangle3d t = iterator.next(); Triangle3d t = iterator.next();
List<Vector3d> vertices = new ArrayList<>(3); if (!t.hasMinExtent(delta)) {
vertices.add(t.getP1());
vertices.add(t.getP2());
vertices.add(t.getP3());
Vector3d centroid = CovarianceMatrix.getCentroid(vertices);
EigenvalueDecomposition ed = OrthogonalRegressionPlane.decompose(vertices, centroid);
Matrix eigenValues = ed.getD();
double[] eigenValuesArray = new double[3];
eigenValuesArray[0] = eigenValues.get(0, 0);
eigenValuesArray[1] = eigenValues.get(1, 1);
eigenValuesArray[2] = eigenValues.get(2, 2);
if (eigenValuesArray[1] < delta) {
iterator.remove(); iterator.remove();
} }
} }
...@@ -448,8 +433,8 @@ public class SelfIntersectionUtil { ...@@ -448,8 +433,8 @@ public class SelfIntersectionUtil {
private static GeometrySelfIntersection doPolygonsIntersect(TesselatedPolygon p1, TesselatedPolygon p2, double epsilon) { private static GeometrySelfIntersection doPolygonsIntersect(TesselatedPolygon p1, TesselatedPolygon p2, double epsilon) {
for (int p1Index = 0; p1Index < p1.getTriangles().size(); p1Index++) { for (int p1Index = 0; p1Index < p1.getTriangles().size(); p1Index++) {
for (int p2Index = 0; p2Index < p2.getTriangles().size(); p2Index++) {
Triangle3d t1 = p1.getTriangles().get(p1Index); Triangle3d t1 = p1.getTriangles().get(p1Index);
for (int p2Index = 0; p2Index < p2.getTriangles().size(); p2Index++) {
Triangle3d t2 = p2.getTriangles().get(p2Index); Triangle3d t2 = p2.getTriangles().get(p2Index);
if (t1.doesIntersect(t2, epsilon)) { if (t1.doesIntersect(t2, epsilon)) {
logger.trace("{} intersects {}", t1, t2); logger.trace("{} intersects {}", t1, t2);
......
...@@ -24,16 +24,7 @@ import de.hft.stuttgart.citydoctor2.check.CheckError; ...@@ -24,16 +24,7 @@ import de.hft.stuttgart.citydoctor2.check.CheckError;
import de.hft.stuttgart.citydoctor2.check.ValidationConfiguration; import de.hft.stuttgart.citydoctor2.check.ValidationConfiguration;
import de.hft.stuttgart.citydoctor2.checkresult.utility.CheckReportWriteException; import de.hft.stuttgart.citydoctor2.checkresult.utility.CheckReportWriteException;
import de.hft.stuttgart.citydoctor2.checks.Checks; import de.hft.stuttgart.citydoctor2.checks.Checks;
import de.hft.stuttgart.citydoctor2.datastructure.BridgeObject;
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.CityFurniture;
import de.hft.stuttgart.citydoctor2.datastructure.CityObject;
import de.hft.stuttgart.citydoctor2.datastructure.GenericCityObject;
import de.hft.stuttgart.citydoctor2.datastructure.TransportationObject;
import de.hft.stuttgart.citydoctor2.datastructure.Tunnel;
import de.hft.stuttgart.citydoctor2.datastructure.Vegetation;
import de.hft.stuttgart.citydoctor2.datastructure.WaterObject;
/** /**
* *
......
...@@ -285,7 +285,6 @@ public class PdfStreamReporter implements StreamReporter { ...@@ -285,7 +285,6 @@ public class PdfStreamReporter implements StreamReporter {
tSection.setHeadlineColor(OK_COLOR); tSection.setHeadlineColor(OK_COLOR);
} }
writeErrorForCityObject(co, tSection); writeErrorForCityObject(co, tSection);
TransportationObject to = (TransportationObject) co;
} }
private void reportVegetation(CityObject co, boolean hasError) { private void reportVegetation(CityObject co, boolean hasError) {
...@@ -389,25 +388,6 @@ public class PdfStreamReporter implements StreamReporter { ...@@ -389,25 +388,6 @@ public class PdfStreamReporter implements StreamReporter {
} }
} }
private void writeCheckResultForTransportationObject(TransportationObject to, Section root) {
Map<CheckId, CheckResult> results = to.getAllCheckResults();
writeCheckResults(results.values(), root);
for (Geometry geom : to.getGeometries()) {
writeCheckResultForGeometry(geom, root);
}
}
private void writeCheckResultForBuildingPart(BuildingPart bp, Section root) {
Map<CheckId, CheckResult> results = bp.getAllCheckResults();
writeCheckResults(results.values(), root);
for (Geometry geom : bp.getGeometries()) {
writeCheckResultForGeometry(geom, root);
}
for (BoundarySurface bs : bp.getBoundarySurfaces()) {
writeCheckResultForBoundarySurface(bs, root);
}
}
private void writeCheckResultForAbstractBuilding(AbstractBuilding ab, Section root) { private void writeCheckResultForAbstractBuilding(AbstractBuilding ab, Section root) {
Map<CheckId, CheckResult> results = ab.getAllCheckResults(); Map<CheckId, CheckResult> results = ab.getAllCheckResults();
writeCheckResults(results.values(), root); writeCheckResults(results.values(), root);
...@@ -714,24 +694,6 @@ public class PdfStreamReporter implements StreamReporter { ...@@ -714,24 +694,6 @@ public class PdfStreamReporter implements StreamReporter {
report.save(outFile); report.save(outFile);
} }
private void countFinishedReportBuildings() {
for (Section s : buildings.getSubSections()) {
if (!s.hasErrors()) {
numOkBuildings++;
// building has no errors, no table
continue;
}
numErrorBuildings++;
Table t = new Table(2);
t.setTableColumnWidth(75, 25);
t.setTitle("Error", "Count");
for (Entry<String, AtomicInteger> e : s.getStats().getErrorCounts().entrySet()) {
t.addRow(e.getKey(), e.getValue().toString());
}
s.addTable(1, t);
}
}
@Override @Override
public void reportGlobalError(CheckError err) { public void reportGlobalError(CheckError err) {
AtomicInteger errorCount = errorStatistics.computeIfAbsent(err.getErrorId(), k -> new AtomicInteger(0)); AtomicInteger errorCount = errorStatistics.computeIfAbsent(err.getErrorId(), k -> new AtomicInteger(0));
......
...@@ -45,7 +45,9 @@ public class DuplicatePointsCheckTest { ...@@ -45,7 +45,9 @@ public class DuplicatePointsCheckTest {
@Test @Test
public void testCheckOK() { public void testCheckOK() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p = new ConcretePolygon(); Polygon p = new ConcretePolygon();
geom.addPolygon(p);
LinearRing lr = new LinearRing(LinearRingType.EXTERIOR); LinearRing lr = new LinearRing(LinearRingType.EXTERIOR);
p.setExteriorRing(lr); p.setExteriorRing(lr);
...@@ -67,7 +69,9 @@ public class DuplicatePointsCheckTest { ...@@ -67,7 +69,9 @@ public class DuplicatePointsCheckTest {
@Test @Test
public void testCheckConsecutivePointSame() { public void testCheckConsecutivePointSame() {
Geometry geom = new Geometry(GeometryType.SOLID, Lod.LOD2, Orientation.OUTWARD);
Polygon p = new ConcretePolygon(); Polygon p = new ConcretePolygon();
geom.addPolygon(p);
LinearRing lr = new LinearRing(LinearRingType.EXTERIOR); LinearRing lr = new LinearRing(LinearRingType.EXTERIOR);
p.setExteriorRing(lr); p.setExteriorRing(lr);
......
...@@ -49,13 +49,13 @@ public class PlanarCheckTest { ...@@ -49,13 +49,13 @@ public class PlanarCheckTest {
Vertex v3 = new Vertex(1, 0, 0); Vertex v3 = new Vertex(1, 0, 0);
LinearRing lr = new LinearRing(LinearRingType.EXTERIOR); LinearRing lr = new LinearRing(LinearRingType.EXTERIOR);
Polygon p = new ConcretePolygon(); Polygon p = new ConcretePolygon();
geom.addPolygon(p);
p.setExteriorRing(lr); p.setExteriorRing(lr);
lr.addVertex(v0); lr.addVertex(v0);
lr.addVertex(v1); lr.addVertex(v1);
lr.addVertex(v2); lr.addVertex(v2);
lr.addVertex(v3); lr.addVertex(v3);
lr.addVertex(v0); lr.addVertex(v0);
geom.addPolygon(p);
PlanarCheck c = new PlanarCheck(); PlanarCheck c = new PlanarCheck();
c.check(p); c.check(p);
assertTrue(p.getCheckResult(c).getResultStatus() == ResultStatus.OK); assertTrue(p.getCheckResult(c).getResultStatus() == ResultStatus.OK);
...@@ -70,6 +70,7 @@ public class PlanarCheckTest { ...@@ -70,6 +70,7 @@ public class PlanarCheckTest {
Vertex v3 = new Vertex(1, 1, 0); Vertex v3 = new Vertex(1, 1, 0);
LinearRing lr = new LinearRing(LinearRingType.EXTERIOR); LinearRing lr = new LinearRing(LinearRingType.EXTERIOR);
Polygon p = new ConcretePolygon(); Polygon p = new ConcretePolygon();
geom.addPolygon(p);
p.setExteriorRing(lr); p.setExteriorRing(lr);
lr.addVertex(v0); lr.addVertex(v0);
lr.addVertex(v1); lr.addVertex(v1);
...@@ -77,7 +78,6 @@ public class PlanarCheckTest { ...@@ -77,7 +78,6 @@ public class PlanarCheckTest {
lr.addVertex(v3); lr.addVertex(v3);
lr.addVertex(v0); lr.addVertex(v0);
lr.setParent(p); lr.setParent(p);
geom.addPolygon(p);
PlanarCheck c = new PlanarCheck(); PlanarCheck c = new PlanarCheck();
c.check(p); c.check(p);
assertTrue(p.getCheckResult(c).getResultStatus() == ResultStatus.ERROR); assertTrue(p.getCheckResult(c).getResultStatus() == ResultStatus.ERROR);
......
...@@ -57,7 +57,9 @@ public class SelfIntersectionUtilTest { ...@@ -57,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);
...@@ -71,6 +73,7 @@ public class SelfIntersectionUtilTest { ...@@ -71,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);
...@@ -90,7 +93,9 @@ public class SelfIntersectionUtilTest { ...@@ -90,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);
...@@ -104,6 +109,7 @@ public class SelfIntersectionUtilTest { ...@@ -104,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);
...@@ -123,7 +129,9 @@ public class SelfIntersectionUtilTest { ...@@ -123,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);
...@@ -137,6 +145,7 @@ public class SelfIntersectionUtilTest { ...@@ -137,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);
...@@ -159,7 +168,9 @@ public class SelfIntersectionUtilTest { ...@@ -159,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);
...@@ -173,6 +184,7 @@ public class SelfIntersectionUtilTest { ...@@ -173,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);
...@@ -192,7 +204,9 @@ public class SelfIntersectionUtilTest { ...@@ -192,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);
...@@ -206,6 +220,7 @@ public class SelfIntersectionUtilTest { ...@@ -206,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);
...@@ -233,7 +248,9 @@ public class SelfIntersectionUtilTest { ...@@ -233,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);
...@@ -247,6 +264,7 @@ public class SelfIntersectionUtilTest { ...@@ -247,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);
...@@ -276,7 +294,9 @@ public class SelfIntersectionUtilTest { ...@@ -276,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);
...@@ -292,6 +312,7 @@ public class SelfIntersectionUtilTest { ...@@ -292,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);
...@@ -331,7 +352,9 @@ public class SelfIntersectionUtilTest { ...@@ -331,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);
...@@ -359,6 +382,7 @@ public class SelfIntersectionUtilTest { ...@@ -359,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);
...@@ -406,7 +430,9 @@ public class SelfIntersectionUtilTest { ...@@ -406,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);
...@@ -434,6 +460,7 @@ public class SelfIntersectionUtilTest { ...@@ -434,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);
...@@ -465,7 +492,9 @@ public class SelfIntersectionUtilTest { ...@@ -465,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);
...@@ -479,6 +508,7 @@ public class SelfIntersectionUtilTest { ...@@ -479,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);
...@@ -497,7 +527,9 @@ public class SelfIntersectionUtilTest { ...@@ -497,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);
...@@ -511,6 +543,7 @@ public class SelfIntersectionUtilTest { ...@@ -511,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);
...@@ -529,7 +562,9 @@ public class SelfIntersectionUtilTest { ...@@ -529,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);
...@@ -543,6 +578,7 @@ public class SelfIntersectionUtilTest { ...@@ -543,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);
...@@ -561,7 +597,9 @@ public class SelfIntersectionUtilTest { ...@@ -561,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);
...@@ -576,6 +614,7 @@ public class SelfIntersectionUtilTest { ...@@ -576,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);
...@@ -600,7 +639,9 @@ public class SelfIntersectionUtilTest { ...@@ -600,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);
...@@ -615,6 +656,7 @@ public class SelfIntersectionUtilTest { ...@@ -615,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);
...@@ -639,7 +681,9 @@ public class SelfIntersectionUtilTest { ...@@ -639,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);
...@@ -654,6 +698,7 @@ public class SelfIntersectionUtilTest { ...@@ -654,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);
...@@ -678,7 +723,9 @@ public class SelfIntersectionUtilTest { ...@@ -678,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);
...@@ -693,6 +740,7 @@ public class SelfIntersectionUtilTest { ...@@ -693,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);
...@@ -737,7 +785,9 @@ public class SelfIntersectionUtilTest { ...@@ -737,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);
...@@ -752,6 +802,7 @@ public class SelfIntersectionUtilTest { ...@@ -752,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);
......
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