From 38ec3261a11b5bb034484314cce3ef649d1a6557 Mon Sep 17 00:00:00 2001 From: Daniel Baston Date: Tue, 28 Feb 2023 09:48:48 -0500 Subject: [PATCH] geosop: Add hausdorffDistance --- util/geosop/GeomFunction.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util/geosop/GeomFunction.cpp b/util/geosop/GeomFunction.cpp index a97a2f269a..f3b3b36ae3 100644 --- a/util/geosop/GeomFunction.cpp +++ b/util/geosop/GeomFunction.cpp @@ -531,6 +531,12 @@ GeomFunction::init() (void)d; // prevent unused variable warning return new Result( geos::algorithm::distance::DiscreteFrechetDistance::distance(*geom, *geomB ) ); }); + add("hausdorffDistance", 2, 0, Result::typeDouble, catDist, + "compute discrete Hausdorff distance between geometry A and B", + [](const std::unique_ptr& geom, const std::unique_ptr& geomB, double d)->Result* { + (void)d; // prevent unused variable warning + return new Result( geos::algorithm::distance::DiscreteHausdorffDistance::distance(*geom, *geomB ) ); + }); /* // MD - can't get this to work for now add("frechetDistanceLine", 2, 0, Result::typeGeometry, catDist,