use of com.revolsys.geometry.algorithm.distance.PointPairDistance in project com.revolsys.open by revolsys.
the class BufferCurveMaximumDistanceFinder method computeMaxVertexDistance.
private void computeMaxVertexDistance(final Geometry curve) {
final PointPairDistance maxPtDist = new PointPairDistance();
final PointPairDistance minPtDist = new PointPairDistance();
for (final Vertex vertex : curve.vertices()) {
minPtDist.initialize();
DistanceToPointFinder.computeDistance(this.inputGeom, vertex, minPtDist);
maxPtDist.setMaximum(minPtDist);
}
this.maxPtDist.setMaximum(maxPtDist);
}
use of com.revolsys.geometry.algorithm.distance.PointPairDistance in project com.revolsys.open by revolsys.
the class VertexHausdorffDistance method computeMaxPointDistance.
private void computeMaxPointDistance(final Geometry pointGeometry, final Geometry geometry, final PointPairDistance pointDistance) {
pointDistance.setMaximum(pointDistance);
final PointPairDistance maxPointDist = new PointPairDistance();
final PointPairDistance minPointDist = new PointPairDistance();
for (final Vertex vertex : pointGeometry.vertices()) {
minPointDist.initialize();
final double x = vertex.getX();
final double y = vertex.getY();
minPointDist.setMinimum(geometry, x, y);
maxPointDist.setMaximum(minPointDist);
}
pointDistance.setMaximum(maxPointDist);
}
use of com.revolsys.geometry.algorithm.distance.PointPairDistance in project com.revolsys.open by revolsys.
the class BufferCurveMaximumDistanceFinder method computeMaxMidpointDistance.
private void computeMaxMidpointDistance(final Geometry curve) {
final PointPairDistance maxPtDist = new PointPairDistance();
final PointPairDistance minPtDist = new PointPairDistance();
for (final Segment segment : curve.segments()) {
final Point midPoint = segment.midPoint();
minPtDist.initialize();
DistanceToPointFinder.computeDistance(this.inputGeom, midPoint, minPtDist);
maxPtDist.setMaximum(minPtDist);
}
this.maxPtDist.setMaximum(maxPtDist);
}
Aggregations