[geos-commits] [SCM] GEOS branch main updated. 96875120762bf622134adc46cec79d68edf19bfa

git at osgeo.org git at osgeo.org
Tue Nov 19 12:51:42 PST 2024


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  96875120762bf622134adc46cec79d68edf19bfa (commit)
      from  fc95e4b8f8490f952a3d3759684dc1c3330f5f83 (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 96875120762bf622134adc46cec79d68edf19bfa
Author: Mike Taves <mwtoews at gmail.com>
Date:   Wed Nov 20 09:51:21 2024 +1300

    Fix typos, add CI job to help catch them (#1194)

diff --git a/.codespellrc b/.codespellrc
new file mode 100644
index 000000000..3dc9e184d
--- /dev/null
+++ b/.codespellrc
@@ -0,0 +1,3 @@
+[codespell]
+skip = ./tools/astyle,./src/deps,./web/themes,./util/geosop/cxxopts.hpp
+ignore-words = ./tools/codespell.ignore
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1900ba626..f0b0aafb2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -524,6 +524,7 @@ jobs:
         set -e
         sudo -E apt-get update
         sudo -E apt-get -yq --no-install-suggests --no-install-recommends install cppcheck
+        python3 -m pip install --disable-pip-version-check --user codespell
 
     - name: 'Check Out'
       uses: actions/checkout at v4
@@ -531,6 +532,9 @@ jobs:
     - name: 'cppcheck'
       run: ./tools/cppcheck.sh
 
+    - name: codespell
+      run: codespell
+      # false-positives can be added to tools/codespell.ignore
 
   cmake-subproject:
     name: 'CMake Subproject'
diff --git a/NEWS.md b/NEWS.md
index 26dbae7be..56cfc634b 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -31,7 +31,7 @@
 
 - Breaking Changes:
   - Zero-length linestrings (eg LINESTRING(1 1, 1 1)) are now treated as equivalent to points (POINT(1 1)) in boolean predicates
-  - CMake 3.15 or later is requried (GH-1143, Mike Taves)
+  - CMake 3.15 or later is required (GH-1143, Mike Taves)
 
 - Fixes/Improvements:
   - WKTReader: Points with all-NaN coordinates are not considered empty anymore (GH-927, Casper van der Wel)
@@ -935,7 +935,7 @@ See 3.7.0 notes
 - Added Polygonizer and LineMerger classes.
 - python wrapper examples
 - General cleanup / warnings removal
-- cleaner win32 / older copilers builds
+- cleaner win32 / older compilers builds
 - Reduced heap allocations
 - debian package builder scripts
 - reduction of standard C lib headers dependency
diff --git a/include/geos/geom/Geometry.h b/include/geos/geom/Geometry.h
index 5ac8a5619..3d052d518 100644
--- a/include/geos/geom/Geometry.h
+++ b/include/geos/geom/Geometry.h
@@ -719,7 +719,7 @@ public:
      *   and dissolving the linework.
      * - Unioning a set of [Polygons](@ref Polygon) will always
      *   return a polygonal geometry (unlike Geometry::Union(const Geometry* other) const),
-     *   which may return geometrys of lower dimension if a topology collapse
+     *   which may return geometries of lower dimension if a topology collapse
      *   occurred.
      *
      * @return the union geometry
diff --git a/include/geos/geom/Surface.h b/include/geos/geom/Surface.h
index 7b1bb6ff3..d2dcb384e 100644
--- a/include/geos/geom/Surface.h
+++ b/include/geos/geom/Surface.h
@@ -100,7 +100,7 @@ protected:
     int
     compareToSameClass(const Geometry* g) const override;
 
-    // Helper method allowing PolygonImpl to use GeometryFactory without cirular imports
+    // Helper method allowing PolygonImpl to use GeometryFactory without circular imports
     static std::unique_ptr<Geometry> createEmptyRing(const GeometryFactory&);
 
     virtual Curve* getExteriorRing() = 0;
diff --git a/include/geos/io/WKTWriter.h b/include/geos/io/WKTWriter.h
index 105b63739..6acaac301 100644
--- a/include/geos/io/WKTWriter.h
+++ b/include/geos/io/WKTWriter.h
@@ -107,7 +107,7 @@ public:
     /**
      * Generates the WKT for a N-point <code>LineString</code>.
      *
-     * @param seq the sequence to outpout
+     * @param seq the sequence to output
      *
      * @return the WKT
      */
diff --git a/include/geos/noding/IteratedNoder.h b/include/geos/noding/IteratedNoder.h
index 5f231fcc7..3e82c8aa1 100644
--- a/include/geos/noding/IteratedNoder.h
+++ b/include/geos/noding/IteratedNoder.h
@@ -104,7 +104,7 @@ public:
 
 
     /** \brief
-     * Fully nodes a list of {@link SegmentString}s, i.e. peforms noding iteratively
+     * Fully nodes a list of {@link SegmentString}s, i.e. performs noding iteratively
      * until no intersections are found between segments.
      *
      * Maintains labelling of edges correctly through the noding.
diff --git a/include/geos/operation/overlayng/OverlayUtil.h b/include/geos/operation/overlayng/OverlayUtil.h
index bc0dbadfb..9c18e5917 100644
--- a/include/geos/operation/overlayng/OverlayUtil.h
+++ b/include/geos/operation/overlayng/OverlayUtil.h
@@ -75,7 +75,7 @@ private:
     * are:
     *
     * - INTERSECTION: result envelope is the intersection of the input envelopes
-    * - DIFERENCE: result envelope is the envelope of the A input geometry
+    * - DIFFERENCE: result envelope is the envelope of the A input geometry
     *
     * Otherwise, <code>null</code> is returned to indicate full extent.
     */
diff --git a/include/geos/planargraph/DirectedEdge.h b/include/geos/planargraph/DirectedEdge.h
index 38d096830..5d1d44358 100644
--- a/include/geos/planargraph/DirectedEdge.h
+++ b/include/geos/planargraph/DirectedEdge.h
@@ -84,7 +84,7 @@ public:
      * to the given parentEdges vector.
      *
      * @note Parents are pushed to the parentEdges vector, make sure
-     * it is empty if index-based corrispondence is important.
+     * it is empty if index-based correspondence is important.
      */
     static void toEdges(std::vector<DirectedEdge*>& dirEdges,
                         std::vector<Edge*>& parentEdges);
diff --git a/include/geos/vend/json.hpp b/include/geos/vend/json.hpp
index c81c5c510..315e0a35b 100644
--- a/include/geos/vend/json.hpp
+++ b/include/geos/vend/json.hpp
@@ -5091,7 +5091,7 @@ struct wide_string_input_helper<BaseInputAdapter, 2>
     }
 };
 
-// Wraps another input apdater to convert wide character types into individual bytes.
+// Wraps another input adapter to convert wide character types into individual bytes.
 template<typename BaseInputAdapter, typename WideCharType>
 class wide_string_input_adapter
 {
diff --git a/src/algorithm/InteriorPointArea.cpp b/src/algorithm/InteriorPointArea.cpp
index 55fbfe6d5..026310d20 100644
--- a/src/algorithm/InteriorPointArea.cpp
+++ b/src/algorithm/InteriorPointArea.cpp
@@ -38,7 +38,7 @@ using namespace geos::geom;
 namespace geos {
 namespace algorithm { // geos.algorithm
 
-// file statics
+// file statistics
 namespace {
 
 double
diff --git a/src/algorithm/MinimumBoundingCircle.cpp b/src/algorithm/MinimumBoundingCircle.cpp
index f454a7ac7..3e634d6e9 100644
--- a/src/algorithm/MinimumBoundingCircle.cpp
+++ b/src/algorithm/MinimumBoundingCircle.cpp
@@ -45,7 +45,7 @@ namespace algorithm { // geos.algorithm
 std::unique_ptr<Geometry>
 MinimumBoundingCircle::getCircle()
 {
-    //TODO: ensure the output circle contains the extermal points.
+    //TODO: ensure the output circle contains the extremal points.
     //TODO: or maybe even ensure that the returned geometry contains ALL the input points?
 
     compute();
diff --git a/src/geom/Point.cpp b/src/geom/Point.cpp
index b5c77570c..9b24f7929 100644
--- a/src/geom/Point.cpp
+++ b/src/geom/Point.cpp
@@ -318,4 +318,4 @@ Point::getCoordinatesRO() const
 }
 
 } // namespace geos::geom
-} // namesapce geos
+} // namespace geos
diff --git a/src/geomgraph/Edge.cpp b/src/geomgraph/Edge.cpp
index 6212703a3..3b4ea5d51 100644
--- a/src/geomgraph/Edge.cpp
+++ b/src/geomgraph/Edge.cpp
@@ -55,7 +55,7 @@ using namespace geos::algorithm;
 
 /**
  * Updates an IM from the label for an edge.
- * Handles edges from both L and A geometrys.
+ * Handles edges from both L and A geometries.
  */
 void
 Edge::updateIM(const Label& lbl, IntersectionMatrix& im)
diff --git a/src/index/bintree/NodeBase.cpp b/src/index/bintree/NodeBase.cpp
index c35296fb9..30331aa5c 100644
--- a/src/index/bintree/NodeBase.cpp
+++ b/src/index/bintree/NodeBase.cpp
@@ -26,7 +26,7 @@ namespace index { // geos.index
 namespace bintree { // geos.index.bintree
 
 /**
- * Returns the index of the subnode that wholely contains the given interval.
+ * Returns the index of the subnode that wholly contains the given interval.
  * If none does, returns -1.
  */
 int
diff --git a/src/operation/buffer/BufferCurveSetBuilder.cpp b/src/operation/buffer/BufferCurveSetBuilder.cpp
index 41038d74e..4fc725f96 100644
--- a/src/operation/buffer/BufferCurveSetBuilder.cpp
+++ b/src/operation/buffer/BufferCurveSetBuilder.cpp
@@ -117,7 +117,7 @@ BufferCurveSetBuilder::addCurve(CoordinateSequence* coord,
     // coord ownership transferred to SegmentString
     SegmentString* e = new NodedSegmentString(coord, coord->hasZ(), coord->hasM(), newlabel);
 
-    // SegmentString doesnt own the sequence, so we need to delete in
+    // SegmentString doesn't own the sequence, so we need to delete in
     // the destructor
     newLabels.push_back(newlabel);
     curveList.push_back(e);
diff --git a/src/operation/relate/RelateComputer.cpp b/src/operation/relate/RelateComputer.cpp
index 90a18ed44..3971a7b99 100644
--- a/src/operation/relate/RelateComputer.cpp
+++ b/src/operation/relate/RelateComputer.cpp
@@ -181,7 +181,7 @@ RelateComputer::computeIM()
 
     /*
      * Now process improper intersections
-     * (eg where one or other of the geometrys has a vertex at the
+     * (eg where one or other of the geometries has a vertex at the
      * intersection point)
      * We need to compute the edge graph at all nodes to determine
      * the IM.
diff --git a/src/operation/relateng/RelateNG.cpp b/src/operation/relateng/RelateNG.cpp
index 9338123ff..8342fe868 100644
--- a/src/operation/relateng/RelateNG.cpp
+++ b/src/operation/relateng/RelateNG.cpp
@@ -534,7 +534,7 @@ RelateNG::computeLineEnds(
                 continue;
 
             const LineString* line = static_cast<const LineString*>(elem);
-            //TODO: add optimzation to skip disjoint elements once exterior point found
+            //TODO: add optimization to skip disjoint elements once exterior point found
             const CoordinateXY& e0 = line->getCoordinatesRO()->getAt(0);
             hasExteriorIntersection |= computeLineEnd(geom, isA, &e0, geomTarget, topoComputer);
             if (topoComputer.isResultKnown()) {
diff --git a/src/operation/relateng/TopologyComputer.cpp b/src/operation/relateng/TopologyComputer.cpp
index 1c164d635..0b6782e42 100644
--- a/src/operation/relateng/TopologyComputer.cpp
+++ b/src/operation/relateng/TopologyComputer.cpp
@@ -231,7 +231,7 @@ TopologyComputer::addIntersection(NodeSection* a, NodeSection* b)
     // we run this first (unlike JTS) in case the subsequent test throws
     // an exception and the NodeSection pointers are not correctly
     // saved in the memory managed store on the NodeSections, causing
-    // a small memeory leak
+    // a small memory leak
     addNodeSections(a, b);
 
     if (! a->isSameGeometry(b)) {
diff --git a/tests/unit/capi/GEOSGeom_transformXYZTest.cpp b/tests/unit/capi/GEOSGeom_transformXYZTest.cpp
index c696b4da5..330696028 100644
--- a/tests/unit/capi/GEOSGeom_transformXYZTest.cpp
+++ b/tests/unit/capi/GEOSGeom_transformXYZTest.cpp
@@ -312,7 +312,7 @@ void object::test<14>() {
     ensure_equals(toWKT(result_), "CIRCULARSTRING Z (0 0 0, 2 3 4, 4 3 0)");
 }
 
-// callback should succed on 2D geometry
+// callback should succeed on 2D geometry
 template <>
 template <>
 void object::test<15>() {
diff --git a/tests/unit/geom/util/GeometryFixerTest.cpp b/tests/unit/geom/util/GeometryFixerTest.cpp
index bc10f61d6..908552dc5 100644
--- a/tests/unit/geom/util/GeometryFixerTest.cpp
+++ b/tests/unit/geom/util/GeometryFixerTest.cpp
@@ -70,8 +70,8 @@ struct test_geometryfixer_data {
 
         std::unique_ptr<Geometry> expected = wktreader_.read(wktExpected);
 
-        // std::cout << "Reslt: " << wktwriter_.write(actual.get()) << std::endl;
-        // std::cout << "Expct: " << wktwriter_.write(expected.get()) << std::endl;
+        // std::cout << "Result: " << wktwriter_.write(actual.get()) << std::endl;
+        // std::cout << "Expect: " << wktwriter_.write(expected.get()) << std::endl;
 
         ensure("Result is invalid", actual->isValid());
         ensure_equals_geometry(expected.get(), actual.get());
diff --git a/tests/xmltester/tests/general/TestPreparedPolygonPredicate.xml b/tests/xmltester/tests/general/TestPreparedPolygonPredicate.xml
index b8a8cb474..d546a9d62 100644
--- a/tests/xmltester/tests/general/TestPreparedPolygonPredicate.xml
+++ b/tests/xmltester/tests/general/TestPreparedPolygonPredicate.xml
@@ -132,7 +132,7 @@
 <case>
   <desc>mA/L
   	A has 2 shells touching at one vertex and one non-vertex.
-  	B passes between the shells, but is wholely contained
+  	B passes between the shells, but is wholly contained
   </desc>
   <a>
     MULTIPOLYGON (((100 30, 30 110, 150 110, 100 30)), 
@@ -204,7 +204,7 @@
 </case>
 
 <case>
-  <desc>A/L - wholely contained
+  <desc>A/L - wholly contained
   </desc>
   <a> POLYGON ((10 10, 60 100, 110 10, 10 10)) 
     </a>
diff --git a/tools/codespell.ignore b/tools/codespell.ignore
new file mode 100644
index 000000000..896a43d83
--- /dev/null
+++ b/tools/codespell.ignore
@@ -0,0 +1,17 @@
+parms
+Geometrys
+deques
+extracter
+implementors
+translater
+thirdparty
+crate
+eiter
+examplar
+nempty
+ba
+te
+seh
+bLoc
+aLo
+Wel
diff --git a/web/content/posts/2024-08-13-relateng.md b/web/content/posts/2024-08-13-relateng.md
index 77906c1ba..4cdcd8ebb 100644
--- a/web/content/posts/2024-08-13-relateng.md
+++ b/web/content/posts/2024-08-13-relateng.md
@@ -30,5 +30,5 @@ The RelateNG work has been run against the entire regression suite and returns e
 
 * The only exception is the handling of a zero-length LineString, which is now treated as logically equivalent to a point.
 
-The RelateNG code is new and there are no doubt lots of places in the implementation that can still be tightened up. The existing pair-wise predicates can be considered deprecated, as the new [implementation is faster](https://lin-ear-th-inking.blogspot.com/2024/05/relateng-performance.html) and just as correct. The existing prepared geometry implementation is still faster, for the cases it supports, but for all the unsupported cases RelateNG now provides faster default implentations.
+The RelateNG code is new and there are no doubt lots of places in the implementation that can still be tightened up. The existing pair-wise predicates can be considered deprecated, as the new [implementation is faster](https://lin-ear-th-inking.blogspot.com/2024/05/relateng-performance.html) and just as correct. The existing prepared geometry implementation is still faster, for the cases it supports, but for all the unsupported cases RelateNG now provides faster default implementations.
 
diff --git a/web/content/posts/2024-09-06-geos-3-13-released.md b/web/content/posts/2024-09-06-geos-3-13-released.md
index d628ee710..a3fc3142d 100644
--- a/web/content/posts/2024-09-06-geos-3-13-released.md
+++ b/web/content/posts/2024-09-06-geos-3-13-released.md
@@ -51,7 +51,7 @@ The full list of changes is as follows:
 
 - **Breaking Changes:**
   - Zero-length linestrings (eg LINESTRING(1 1, 1 1)) are now treated as equivalent to points (POINT(1 1)) in boolean predicates
-  - CMake 3.15 or later is requried ([GH-1143](https://github.com/libgeos/geos/issues/1143), Mike Taves)
+  - CMake 3.15 or later is required ([GH-1143](https://github.com/libgeos/geos/issues/1143), Mike Taves)
 
 - **Fixes/Improvements:**
   - Add Angle::sinCosSnap to avoid small errors, e.g. with buffer operations ([GH-978](https://github.com/libgeos/geos/issues/978), Mike Taves)
diff --git a/web/content/usage/tools.md b/web/content/usage/tools.md
index 679840a94..b29bace9e 100644
--- a/web/content/usage/tools.md
+++ b/web/content/usage/tools.md
@@ -11,7 +11,7 @@ weight: 100
 `geosop` is a CLI (command-line interface) for GEOS. It can be used to:
 
 * Run GEOS operations on one or many geometries
-* Output geometry resuls in various formats (WKT and WKB)
+* Output geometry results in various formats (WKT and WKB)
 * Convert between WKT and WKB
 * Time the performance of operations
 * Check for memory leaks in operations

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

Summary of changes:
 .codespellrc                                            |  3 +++
 .github/workflows/ci.yml                                |  4 ++++
 NEWS.md                                                 |  4 ++--
 include/geos/geom/Geometry.h                            |  2 +-
 include/geos/geom/Surface.h                             |  2 +-
 include/geos/io/WKTWriter.h                             |  2 +-
 include/geos/noding/IteratedNoder.h                     |  2 +-
 include/geos/operation/overlayng/OverlayUtil.h          |  2 +-
 include/geos/planargraph/DirectedEdge.h                 |  2 +-
 include/geos/vend/json.hpp                              |  2 +-
 src/algorithm/InteriorPointArea.cpp                     |  2 +-
 src/algorithm/MinimumBoundingCircle.cpp                 |  2 +-
 src/geom/Point.cpp                                      |  2 +-
 src/geomgraph/Edge.cpp                                  |  2 +-
 src/index/bintree/NodeBase.cpp                          |  2 +-
 src/operation/buffer/BufferCurveSetBuilder.cpp          |  2 +-
 src/operation/relate/RelateComputer.cpp                 |  2 +-
 src/operation/relateng/RelateNG.cpp                     |  2 +-
 src/operation/relateng/TopologyComputer.cpp             |  2 +-
 tests/unit/capi/GEOSGeom_transformXYZTest.cpp           |  2 +-
 tests/unit/geom/util/GeometryFixerTest.cpp              |  4 ++--
 .../tests/general/TestPreparedPolygonPredicate.xml      |  4 ++--
 tools/codespell.ignore                                  | 17 +++++++++++++++++
 web/content/posts/2024-08-13-relateng.md                |  2 +-
 web/content/posts/2024-09-06-geos-3-13-released.md      |  2 +-
 web/content/usage/tools.md                              |  2 +-
 26 files changed, 50 insertions(+), 26 deletions(-)
 create mode 100644 .codespellrc
 create mode 100644 tools/codespell.ignore


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list