org.apache.lucene.geo3d

## Interface GeoDistance

- All Superinterfaces:
    Membership
  All Known Subinterfaces:
    GeoCircle, GeoDistanceShape
  All Known Implementing Classes:
    GeoBaseCircle, GeoBaseDistanceShape, GeoDegeneratePoint, GeoPath, GeoStandardCircle

      public interface GeoDistance
      extends Membership

  An implementer of this interface is capable of computing the described "distance" values, which are meant to provide both actual distance values, as well as distance estimates that can be computed more cheaply.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `computeDistance(DistanceStyle distanceStyle, double x, double y, double z)` Compute this shape's internal "distance" to the GeoPoint.
    `double` | `computeDistance(DistanceStyle distanceStyle, GeoPoint point)` Compute this shape's internal "distance" to the GeoPoint.

    - ### Methods inherited from interface org.apache.lucene.geo3d.Membership

      `isWithin, isWithin`

- - ### Method Detail

    - #### computeDistance

          double computeDistance(DistanceStyle distanceStyle,
                               GeoPoint point)

      Compute this shape's internal "distance" to the GeoPoint. Implementations should clarify how this is computed when it's non-obvious. A return value of Double.MAX_VALUE should be returned for points outside of the shape.
      Parameters:
        `distanceStyle` - is the distance style.
        `point` - is the point to compute the distance to.
      Returns:
        the distance.

    - #### computeDistance

          double computeDistance(DistanceStyle distanceStyle,
                               double x,
                               double y,
                               double z)

      Compute this shape's internal "distance" to the GeoPoint. Implementations should clarify how this is computed when it's non-obvious. A return value of Double.MAX_VALUE should be returned for points outside of the shape.
      Parameters:
        `x` - is the point's unit x coordinate (using U.S. convention).
        `y` - is the point's unit y coordinate (using U.S. convention).
        `z` - is the point's unit z coordinate (using U.S. convention).
      Returns:
        the distance.

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.