Skip to content

Commit

Permalink
geosop: Add hausdorffDistance
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaston committed Feb 28, 2023
1 parent 76030c2 commit 38ec326
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions util/geosop/GeomFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Geometry>& geom, const std::unique_ptr<Geometry>& 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,
Expand Down

0 comments on commit 38ec326

Please sign in to comment.