org.apache.lucene.spatial3d.geom

## Class NormalDistance

- java.lang.Object
- - org.apache.lucene.spatial3d.geom.NormalDistance

- All Implemented Interfaces:
    DistanceStyle

      public class NormalDistance
      extends Object
      implements DistanceStyle

  Normal 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 NormalDistance` | `INSTANCE` A convenient instance

    - ### Fields inherited from interface org.apache.lucene.spatial3d.geom.DistanceStyle

      `ARC, LINEAR, LINEAR_SQUARED, NORMAL, NORMAL_SQUARED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NormalDistance()` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete 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.
    `GeoPoint[]` | `findDistancePoints(PlanetModel planetModel, double distanceValue, GeoPoint startPoint, Plane plane, Membership... bounds)` Find a GeoPoint, at a specified distance from a starting point, within the specified bounds.
    `double` | `findMaximumArcDistance(PlanetModel planetModel, double distanceValue)` Given a distance metric, find the maximum arc distance represented by the distance metric.
    `double` | `findMinimumArcDistance(PlanetModel planetModel, double distanceValue)` Given a distance metric, find the minimum arc distance represented by that distance metric.

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

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

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

      `aggregateDistances, fromAggregationForm, toAggregationForm`

- - ### Field Detail

    - #### INSTANCE

          public static final NormalDistance INSTANCE

      A convenient instance

  - ### Constructor Detail

    - #### NormalDistance

          public NormalDistance()

      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

    - #### findDistancePoints

          public GeoPoint[] findDistancePoints(PlanetModel planetModel,
                                               double distanceValue,
                                               GeoPoint startPoint,
                                               Plane plane,
                                               Membership... bounds)

      Description copied from interface: `DistanceStyle`
      Find a GeoPoint, at a specified distance from a starting point, within the specified bounds. The GeoPoint must be in the specified plane.
      Specified by:
        `findDistancePoints` in interface `DistanceStyle`
      Parameters:
        `planetModel` - is the planet model.
        `distanceValue` - is the distance to set the new point at, measured from point1 and on the way to point2.
        `startPoint` - is the starting point.
        `plane` - is the plane that the point must be in.
        `bounds` - are the constraints on where the point can be found.
      Returns:
        zero, one, or two points at the proper distance from startPoint.

    - #### findMinimumArcDistance

          public double findMinimumArcDistance(PlanetModel planetModel,
                                               double distanceValue)

      Description copied from interface: `DistanceStyle`
      Given a distance metric, find the minimum arc distance represented by that distance metric.
      Specified by:
        `findMinimumArcDistance` in interface `DistanceStyle`
      Parameters:
        `planetModel` - is the planet model.
        `distanceValue` - is the distance metric.
      Returns:
        the minimum arc distance that that distance value can represent given the planet model.

    - #### findMaximumArcDistance

          public double findMaximumArcDistance(PlanetModel planetModel,
                                               double distanceValue)

      Description copied from interface: `DistanceStyle`
      Given a distance metric, find the maximum arc distance represented by the distance metric.
      Specified by:
        `findMaximumArcDistance` in interface `DistanceStyle`
      Parameters:
        `planetModel` - is the planet model.
        `distanceValue` - is the distance metric.
      Returns:
        the maximum arc distance that that distance value can represent given the planet model.

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