123 return ptDist.getDistance();
129 computeOrientedDistance(g0, g1, ptDist);
130 return ptDist.getDistance();
133 const std::array<geom::CoordinateXY, 2>
134 getCoordinates()
const
136 return ptDist.getCoordinates();
147 filter_ro(
const geom::CoordinateXY* pt)
override
149 minPtDist.initialize();
150 DistanceToPoint::computeDistance(geom, *pt,
152 maxPtDist.setMaximum(minPtDist);
155 const PointPairDistance&
156 getMaxPointDistance()
const
162 PointPairDistance maxPtDist;
163 PointPairDistance minPtDist;
164 DistanceToPoint euclideanDist;
165 const geom::Geometry& geom;
168 MaxPointDistanceFilter(
const MaxPointDistanceFilter& other);
169 MaxPointDistanceFilter& operator=(
const MaxPointDistanceFilter& rhs);
172 class MaxDensifiedByFractionDistanceFilter
173 :
public geom::CoordinateSequenceFilter {
176 MaxDensifiedByFractionDistanceFilter(
177 const geom::Geometry& p_geom,
double fraction)
181 numSubSegs(std::size_t(util::
round(1.0 / fraction)))
185 void filter_ro(
const geom::CoordinateSequence& seq,
186 std::size_t index)
override;
189 isGeometryChanged()
const override
195 isDone()
const override
200 const PointPairDistance&
201 getMaxPointDistance()
const
207 PointPairDistance maxPtDist;
208 PointPairDistance minPtDist;
209 const geom::Geometry& geom;
210 std::size_t numSubSegs;
213 MaxDensifiedByFractionDistanceFilter(
const MaxDensifiedByFractionDistanceFilter& other);
214 MaxDensifiedByFractionDistanceFilter& operator=(
const MaxDensifiedByFractionDistanceFilter& rhs);
220 compute(
const geom::Geometry& p_g0,
221 const geom::Geometry& p_g1)
223 computeOrientedDistance(p_g0, p_g1, ptDist);
224 computeOrientedDistance(p_g1, p_g0, ptDist);
227 void computeOrientedDistance(
const geom::Geometry& discreteGeom,
228 const geom::Geometry& geom,
229 PointPairDistance& ptDist);
231 const geom::Geometry& g0;
233 const geom::Geometry& g1;
235 PointPairDistance ptDist;
241 DiscreteHausdorffDistance(
const DiscreteHausdorffDistance& other) =
delete;
242 DiscreteHausdorffDistance& operator=(
const DiscreteHausdorffDistance& rhs) =
delete;