Class NearestPointFinder.NearestPointFilter

java.lang.Object
org.locationtech.jtstest.testbuilder.geom.NearestPointFinder.NearestPointFilter
All Implemented Interfaces:
CoordinateSequenceFilter
Enclosing class:
NearestPointFinder

static class NearestPointFinder.NearestPointFilter extends Object implements CoordinateSequenceFilter
  • Field Details

    • tolerance

      private double tolerance
    • basePt

      private Coordinate basePt
    • nearestPt

      private Coordinate nearestPt
    • dist

      private double dist
  • Constructor Details

    • NearestPointFilter

      public NearestPointFilter(Coordinate basePt, double tolerance)
  • Method Details

    • filter

      public void filter(CoordinateSequence seq, int i)
      Description copied from interface: CoordinateSequenceFilter
      Performs an operation on a coordinate in a CoordinateSequence.
      Specified by:
      filter in interface CoordinateSequenceFilter
      Parameters:
      seq - the CoordinateSequence to which the filter is applied
      i - the index of the coordinate to apply the filter to
    • getNearestPoint

      public Coordinate getNearestPoint()
    • isDone

      public boolean isDone()
      Description copied from interface: CoordinateSequenceFilter
      Reports whether the application of this filter can be terminated. Once this method returns false, it should continue to return false on every subsequent call.
      Specified by:
      isDone in interface CoordinateSequenceFilter
      Returns:
      true if the application of this filter can be terminated.
    • isGeometryChanged

      public boolean isGeometryChanged()
      Description copied from interface: CoordinateSequenceFilter
      Reports whether the execution of this filter has modified the coordinates of the geometry. If so, Geometry.geometryChanged() will be executed after this filter has finished being executed.

      Most filters can simply return a constant value reflecting whether they are able to change the coordinates.

      Specified by:
      isGeometryChanged in interface CoordinateSequenceFilter
      Returns:
      true if this filter has changed the coordinates of the geometry