[geos-commits] [SCM] GEOS branch master updated. 98641ab14e01a6b5a6339f49fa6f1bee4424c7d0

git at osgeo.org git at osgeo.org
Tue Jan 19 11:48:30 PST 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, master has been updated
       via  98641ab14e01a6b5a6339f49fa6f1bee4424c7d0 (commit)
      from  395e6c2d2531eda7483dd137058041f830e33825 (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 98641ab14e01a6b5a6339f49fa6f1bee4424c7d0
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Tue Jan 19 11:48:24 2021 -0800

    Add geosop isEmpty function

diff --git a/util/geosop/GeomFunction.cpp b/util/geosop/GeomFunction.cpp
index 176dbcc..dff83ad 100644
--- a/util/geosop/GeomFunction.cpp
+++ b/util/geosop/GeomFunction.cpp
@@ -124,6 +124,11 @@ GeomFunction::init()
             return new Result( geom->intersects( geomB.get() ) );
         });
 
+    add("isEmpty", "tests if geometry A is empty", 1, 0,
+        [](const std::unique_ptr<Geometry>& geom, const std::unique_ptr<Geometry>& geomB, double d)->Result* {
+            return new Result( geom->isEmpty() );
+        });
+
     add("isSimple", "tests if geometry A is simple", 1, 0,
         [](const std::unique_ptr<Geometry>& geom, const std::unique_ptr<Geometry>& geomB, double d)->Result* {
             return new Result( geom->isSimple() );
@@ -157,7 +162,7 @@ GeomFunction::init()
             return new Result( std::move(res) );
         });
 
-    add("nearestPoints", "computes nearest points of geometry A and B", 2, 0,
+    add("nearestPoints", "computes a line containing the nearest points of geometry A and B", 2, 0,
         [](const std::unique_ptr<Geometry>& geom, const std::unique_ptr<Geometry>& geomB, double d)->Result* {
             std::unique_ptr<CoordinateSequence> cs = geos::operation::distance::DistanceOp::nearestPoints(geom.get(), geomB.get());
             auto factory = geom->getFactory();
@@ -273,7 +278,7 @@ GeomFunction::init()
         [](const std::unique_ptr<Geometry>& geom, const std::unique_ptr<Geometry>& geomB, double d)->Result* {
             return new Result( prepGeomCache.get(geom.get())->distance( geomB.get() ) );
         });
-    add("nearestPointsPrep", "computes nearest points of geometry A and B using PreparedGeometry", 2, 0,
+    add("nearestPointsPrep", "computes a line containing the nearest points of geometry A and B using PreparedGeometry", 2, 0,
         [](const std::unique_ptr<Geometry>& geom, const std::unique_ptr<Geometry>& geomB, double d)->Result* {
             auto cs = prepGeomCache.get(geom.get())->nearestPoints( geomB.get() );
             auto factory = geom->getFactory();

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

Summary of changes:
 util/geosop/GeomFunction.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list