[geos-commits] [SCM] GEOS branch main updated. 7315c299aaace9fdf9ae55042bc7ae1f32856009
git at osgeo.org
git at osgeo.org
Thu Sep 16 20:24:00 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 7315c299aaace9fdf9ae55042bc7ae1f32856009 (commit)
from c355bb2a766d60581d7fe8ecd7e0a3fe186cc48f (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 7315c299aaace9fdf9ae55042bc7ae1f32856009
Author: Martin Davis <mtnclimb at gmail.com>
Date: Thu Sep 16 20:23:54 2021 -0700
Add geosop DiscreteFrechetDistance
diff --git a/util/geosop/GeomFunction.cpp b/util/geosop/GeomFunction.cpp
index d5984df..b03ecfa 100644
--- a/util/geosop/GeomFunction.cpp
+++ b/util/geosop/GeomFunction.cpp
@@ -27,6 +27,8 @@
#include <geos/algorithm/construct/LargestEmptyCircle.h>
#include <geos/algorithm/construct/MaximumInscribedCircle.h>
#include <geos/algorithm/MinimumBoundingCircle.h>
+#include <geos/algorithm/distance/DiscreteHausdorffDistance.h>
+#include <geos/algorithm/distance/DiscreteFrechetDistance.h>
#include <geos/geom/util/Densifier.h>
#include <geos/operation/linemerge/LineMerger.h>
#include <geos/operation/distance/DistanceOp.h>
@@ -135,6 +137,13 @@ GeomFunction::init()
(void)d; // prevent unused variable warning
return new Result( geom->distance( geomB.get() ) );
});
+ add("frechetDistance", 2, 0, Result::typeDouble,
+ "computes discrete Frechet distance between geometry A and B",
+ [](const std::unique_ptr<Geometry>& geom, const std::unique_ptr<Geometry>& geomB, double d)->Result* {
+ (void)d; // prevent unused variable warning
+ return new Result( geos::algorithm::distance::DiscreteFrechetDistance::distance(*geom, *geomB ) );
+ });
+
add("envelope", Result::typeGeometry,
[](const std::unique_ptr<Geometry>& geom, const std::unique_ptr<Geometry>& geomB, double d)->Result* {
-----------------------------------------------------------------------
Summary of changes:
util/geosop/GeomFunction.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list