org.apache.lucene.geo3d

## Class LinearDistance

- java.lang.Object
- - org.apache.lucene.geo3d.LinearDistance

- All Implemented Interfaces:
    DistanceStyle

      public class LinearDistance
      extends Object
      implements DistanceStyle

  Linear distance computation style.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static LinearDistance` | `INSTANCE` A convenient instance

    - ### Fields inherited from interface org.apache.lucene.geo3d.DistanceStyle

      `ARC, LINEAR, LINEAR_SQUARED, NORMAL, NORMAL_SQUARED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LinearDistance()` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `computeDistance(GeoPoint point1, double x2, double y2, double z2)` Compute the distance from a point to another point.
    `double` | `computeDistance(GeoPoint point1, GeoPoint point2)` Compute the distance from a point to another point.
    `double` | `computeDistance(PlanetModel planetModel, Plane plane, double x, double y, double z, Membership... bounds)` Compute the distance from a plane to a point.
    `double` | `computeDistance(PlanetModel planetModel, Plane plane, GeoPoint point, Membership... bounds)` Compute the distance from a plane to a point.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final LinearDistance INSTANCE

      A convenient instance

  - ### Constructor Detail

    - #### LinearDistance

          public LinearDistance()

      Constructor.

  - ### Method Detail

    - #### computeDistance

          public double computeDistance(GeoPoint point1,
                               GeoPoint point2)

      Description copied from interface: `DistanceStyle`
      Compute the distance from a point to another point.
      Specified by:
        `computeDistance` in interface `DistanceStyle`
      Parameters:
        `point1` - Starting point
        `point2` - Final point
      Returns:
        the distance

    - #### computeDistance

          public double computeDistance(GeoPoint point1,
                               double x2,
                               double y2,
                               double z2)

      Description copied from interface: `DistanceStyle`
      Compute the distance from a point to another point.
      Specified by:
        `computeDistance` in interface `DistanceStyle`
      Parameters:
        `point1` - Starting point
        `x2` - Final point x
        `y2` - Final point y
        `z2` - Final point z
      Returns:
        the distance

    - #### computeDistance

          public double computeDistance(PlanetModel planetModel,
                               Plane plane,
                               GeoPoint point,
                               Membership... bounds)

      Description copied from interface: `DistanceStyle`
      Compute the distance from a plane to a point.
      Specified by:
        `computeDistance` in interface `DistanceStyle`
      Parameters:
        `planetModel` - The planet model
        `plane` - The plane
        `point` - The point
        `bounds` - are the plane bounds
      Returns:
        the distance

    - #### computeDistance

          public double computeDistance(PlanetModel planetModel,
                               Plane plane,
                               double x,
                               double y,
                               double z,
                               Membership... bounds)

      Description copied from interface: `DistanceStyle`
      Compute the distance from a plane to a point.
      Specified by:
        `computeDistance` in interface `DistanceStyle`
      Parameters:
        `planetModel` - The planet model
        `plane` - The plane
        `x` - The point x
        `y` - The point y
        `z` - The point z
        `bounds` - are the plane bounds
      Returns:
        the distance

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