org.apache.lucene.spatial3d.geom

## Interface GeoDistance

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

      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

    All Methods Instance Methods Abstract Methods Default 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.
    `default double` | `computeDistance(DistanceStyle distanceStyle, GeoPoint point)` Compute this shape's internal "distance" to the GeoPoint.

    - ### Methods inherited from interface org.apache.lucene.spatial3d.geom.Membership

      `isWithin, isWithin`

- - ### Method Detail

    - #### computeDistance

          default 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.POSITIVE_INFINITY 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.POSITIVE_INFINITY 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-2018 Apache Software Foundation. All Rights Reserved.