Search in sources :

Example 1 with PointPairDistance

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);
}
Also used : PointPairDistance(com.revolsys.geometry.algorithm.distance.PointPairDistance) Vertex(com.revolsys.geometry.model.vertex.Vertex)

Example 2 with PointPairDistance

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);
}
Also used : PointPairDistance(com.revolsys.geometry.algorithm.distance.PointPairDistance) Vertex(com.revolsys.geometry.model.vertex.Vertex)

Example 3 with PointPairDistance

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);
}
Also used : PointPairDistance(com.revolsys.geometry.algorithm.distance.PointPairDistance) Point(com.revolsys.geometry.model.Point) Segment(com.revolsys.geometry.model.segment.Segment)

Aggregations

PointPairDistance (com.revolsys.geometry.algorithm.distance.PointPairDistance)3 Vertex (com.revolsys.geometry.model.vertex.Vertex)2 Point (com.revolsys.geometry.model.Point)1 Segment (com.revolsys.geometry.model.segment.Segment)1