[geos-commits] [SCM] GEOS branch main updated. 967bbb23eb5735e6755fefb3dcb11c4b34ac677e

git at osgeo.org git at osgeo.org
Fri Sep 10 16:03:18 PDT 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, main has been updated
       via  967bbb23eb5735e6755fefb3dcb11c4b34ac677e (commit)
      from  9e3aa68491ca56a93181e6a11272bb1feef06161 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 967bbb23eb5735e6755fefb3dcb11c4b34ac677e
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Sep 10 16:03:13 2021 -0700

    Remove some dead code, turn on some robustness tests that work now

diff --git a/include/geos/geomgraph/Node.h b/include/geos/geomgraph/Node.h
index a5fe39d..1dbb40e 100644
--- a/include/geos/geomgraph/Node.h
+++ b/include/geos/geomgraph/Node.h
@@ -169,7 +169,8 @@ Node::testInvariant() const
         }
     }
 
-#if 0 // We can't rely on numerical stability with FP computations
+#if 0
+    // We can't rely on numerical stability with FP computations
     // ztot is the sum of doubnle sin zvals vector
     double ztot_check = 0.0;
     for(std::vector<double>::const_iterator
diff --git a/src/geom/Envelope.cpp b/src/geom/Envelope.cpp
index 4563e89..17e8fb5 100644
--- a/src/geom/Envelope.cpp
+++ b/src/geom/Envelope.cpp
@@ -103,19 +103,6 @@ Envelope::Envelope(const std::string& str)
          strtod(values[3].c_str(), nullptr));
 }
 
-#if 0
-/**
- *  Initialize an <code>Envelope</code> from an existing Envelope.
- *
- *@param  env  the Envelope to initialize from
- */
-void
-Envelope::init(Envelope env)
-{
-    init(env.minx, env.maxx, env.miny, env.maxy);
-}
-#endif // 0
-
 
 /*public*/
 bool
diff --git a/src/geomgraph/DirectedEdge.cpp b/src/geomgraph/DirectedEdge.cpp
index 1400a0a..c2bc731 100644
--- a/src/geomgraph/DirectedEdge.cpp
+++ b/src/geomgraph/DirectedEdge.cpp
@@ -55,23 +55,6 @@ DirectedEdge::depthFactor(Location currLocation, Location nextLocation)
     return 0;
 }
 
-#if 0
-DirectedEdge::DirectedEdge():
-    EdgeEnd(),
-    isInResultVar(false),
-    isVisitedVar(false),
-    sym(NULL),
-    next(NULL),
-    nextMin(NULL),
-    edgeRing(NULL),
-    minEdgeRing(NULL)
-{
-    depth[0] = 0;
-    depth[1] = -999;
-    depth[2] = -999;
-
-}
-#endif
 
 DirectedEdge::DirectedEdge(Edge* newEdge, bool newIsForward):
     EdgeEnd(newEdge),
diff --git a/src/noding/GeometryNoder.cpp b/src/noding/GeometryNoder.cpp
index 11fd77d..3442f83 100644
--- a/src/noding/GeometryNoder.cpp
+++ b/src/noding/GeometryNoder.cpp
@@ -162,25 +162,12 @@ GeometryNoder::getNoder()
 {
     if(! noder.get()) {
         const geom::PrecisionModel* pm = argGeom.getFactory()->getPrecisionModel();
-#if 0
-        using algorithm::LineIntersector;
-        LineIntersector li;
-        IntersectionAdder intersectionAdder(li);
-        noder.reset(new MCIndexNoder(&intersectionAdder));
-#else
-
         IteratedNoder* in = new IteratedNoder(pm);
-        //in->setMaximumIterations(0);
         noder.reset(in);
-
-        //using snapround::MCIndexSnapRounder;
-        //noder.reset( new MCIndexSnapRounder(*pm) );
-#endif
     }
     return *noder;
-
-
 }
 
+
 } // namespace geos.noding
 } // namespace geos
diff --git a/src/noding/OrientedCoordinateArray.cpp b/src/noding/OrientedCoordinateArray.cpp
index 352d6fb..ab8af73 100644
--- a/src/noding/OrientedCoordinateArray.cpp
+++ b/src/noding/OrientedCoordinateArray.cpp
@@ -44,19 +44,6 @@ OrientedCoordinateArray::compareTo(const OrientedCoordinateArray& oca) const
 {
     int comp = compareOriented(*pts, orientationVar,
                                *oca.pts, oca.orientationVar);
-#if 0 // MD - testing only
-    int oldComp = SegmentStringDissolver.ptsComp.compare(pts, oca.pts);
-    if((oldComp == 0 || comp == 0) && oldComp != comp) {
-        System.out.println("bidir mismatch");
-
-        boolean orient1 = orientation(pts);
-        boolean orient2 = orientation(oca.pts);
-        int comp2 = compareOriented(pts, orientation,
-                                    oca.pts, oca.orientation);
-        int oldComp2 = SegmentStringDissolver.ptsComp.compare(pts, oca.pts);
-    }
-#endif
-
     return comp;
 }
 
diff --git a/src/operation/overlay/ElevationMatrix.cpp b/src/operation/overlay/ElevationMatrix.cpp
index f5682d3..a3074a1 100644
--- a/src/operation/overlay/ElevationMatrix.cpp
+++ b/src/operation/overlay/ElevationMatrix.cpp
@@ -124,16 +124,6 @@ ElevationMatrix::add(const Geometry* geom)
 
 }
 
-#if 0
-void
-ElevationMatrix::add(const CoordinateSequence* cs)
-{
-    unsigned int ncoords = cs->getSize();
-    for(unsigned int i = 0; i < ncoords; i++) {
-        add(cs->getAt(i));
-    }
-}
-#endif
 
 void
 ElevationMatrix::add(const Coordinate& c)
diff --git a/tests/unit/algorithm/RobustLineIntersectionTest.cpp b/tests/unit/algorithm/RobustLineIntersectionTest.cpp
index 0e3ef2b..8ee79e2 100644
--- a/tests/unit/algorithm/RobustLineIntersectionTest.cpp
+++ b/tests/unit/algorithm/RobustLineIntersectionTest.cpp
@@ -381,7 +381,6 @@ void object::test<6>
         0);
 }
 
-#if 0 // fails: finds an intersection (we don't have DD)
 /**
  * Test from Tomas Fa - JTS list 6/13/2012
  *
@@ -399,9 +398,7 @@ void object::test<7>
         "LINESTRING (-5.9 163.1, 76.1 250.7)",
         "LINESTRING (14.6 185.0, 96.6 272.6)");
 }
-#endif // fails
 
-#if 0 // fails: finds an intersection (we don't have DD)
 /**
  * Test from Tomas Fa - JTS list 6/13/2012
  *
@@ -419,7 +416,7 @@ void object::test<8>
         "LINESTRING (-42.0 163.2, 21.2 265.2)",
         "LINESTRING (-26.2 188.7, 37.0 290.7)");
 }
-#endif // fails
+
 
 /**
  * Following cases were failures when using the CentralEndpointIntersector heuristic.
diff --git a/tests/unit/capi/GEOSEqualsTest.cpp b/tests/unit/capi/GEOSEqualsTest.cpp
index a686424..053835d 100644
--- a/tests/unit/capi/GEOSEqualsTest.cpp
+++ b/tests/unit/capi/GEOSEqualsTest.cpp
@@ -142,12 +142,10 @@ template<>
 void object::test<6>
 ()
 {
-    const char* wkt1 = "GEOMETRYCOLLECTION(POLYGON ("
-                       "(0 0, 0 4, 4 4, 4 0, 0 0)"
-                       "),"
-                       "POLYGON ("
-                       "(3 3, 3 4, 4 4, 4 3, 3 3)"
-                       "))";
+    const char* wkt1 = "GEOMETRYCOLLECTION("
+                       "POLYGON ((0 0, 0 4, 4 4, 4 0, 0 0)),"
+                       "POLYGON ((3 3, 3 4, 4 4, 4 3, 3 3))"
+                       ")";
 
     geom1_ = GEOSGeomFromWKT(wkt1);
 
diff --git a/tests/unit/linearref/LengthIndexedLineTest.cpp b/tests/unit/linearref/LengthIndexedLineTest.cpp
index f85dcec..5eb22e1 100644
--- a/tests/unit/linearref/LengthIndexedLineTest.cpp
+++ b/tests/unit/linearref/LengthIndexedLineTest.cpp
@@ -488,20 +488,14 @@ void object::test<27>
         10, -10, "LINESTRING (10 0, 10 0)");
 }
 
-
-
-
-
 #if 0
 template<>
 template<>
-void object::test<28>
-()
+void object::test<28>()
 {
-
     GeomPtr linearGeom(reader.read(
-                           "MULTILINESTRING ((0 -2, 0 2),(-2 0, 2 0))"
-                       ));
+        "MULTILINESTRING ((0 -2, 0 2),(-2 0, 2 0))"
+        ));
     LengthIndexedLine indexedLine(linearGeom.get());
 
     double projIndex = indexedLine.project(Coordinate(2, 1.9));
@@ -518,8 +512,7 @@ void object::test<28>
 
 template<>
 template<>
-void object::test<29>
-()
+void object::test<29>()
 {
     GeomPtr linearGeom(reader.read("LINESTRING EMPTY"));
     LengthIndexedLine indexedLine(linearGeom.get());

-----------------------------------------------------------------------

Summary of changes:
 include/geos/geomgraph/Node.h                       |  3 ++-
 src/geom/Envelope.cpp                               | 13 -------------
 src/geomgraph/DirectedEdge.cpp                      | 17 -----------------
 src/noding/GeometryNoder.cpp                        | 15 +--------------
 src/noding/OrientedCoordinateArray.cpp              | 13 -------------
 src/operation/overlay/ElevationMatrix.cpp           | 10 ----------
 tests/unit/algorithm/RobustLineIntersectionTest.cpp |  5 +----
 tests/unit/capi/GEOSEqualsTest.cpp                  | 10 ++++------
 tests/unit/linearref/LengthIndexedLineTest.cpp      | 15 ++++-----------
 9 files changed, 12 insertions(+), 89 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list