org.apache.lucene.spatial3d.geom

## Class PlanetModel

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

-     public class PlanetModel
      extends Object

  Holds mathematical constants associated with the model of a planet.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `double` | `ab` The x/y scaling factor
    `double` | `c` The z scaling factor
    `double` | `flattening` The flattening value
    `double` | `inverseAb` The inverse of ab
    `double` | `inverseAbSquared` The square of the inverse of ab
    `double` | `inverseC` The inverse of c
    `double` | `inverseCSquared` The square of the inverse of c
    `GeoPoint` | `MAX_X_POLE` Max X pole
    `GeoPoint` | `MAX_Y_POLE` Max Y pole
    `GeoPoint` | `MIN_X_POLE` Min X pole
    `GeoPoint` | `MIN_Y_POLE` Min Y pole
    `GeoPoint` | `NORTH_POLE` North pole
    `GeoPoint` | `SOUTH_POLE` South pole
    `static PlanetModel` | `SPHERE` Planet model corresponding to sphere.
    `double` | `squareRatio` The square ratio
    `static PlanetModel` | `WGS84` Planet model corresponding to WGS84
    `static double` | `WGS84_EQUATORIAL` Equatorial radius
    `static double` | `WGS84_MEAN` Mean radius
    `static double` | `WGS84_POLAR` Polar radius

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PlanetModel(double ab, double c)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `GeoPoint` | `bisection(GeoPoint pt1, GeoPoint pt2)` Compute a GeoPoint that's a bisection between two other GeoPoints.
    `GeoPoint` | `createSurfacePoint(double x, double y, double z)` Compute a GeoPoint that's based on (x,y,z) values, but is scaled to actually be on the planet surface.
    `GeoPoint` | `createSurfacePoint(Vector vector)` Compute a GeoPoint that's scaled to actually be on the planet surface.
    `boolean` | `equals(Object o)`
    `double` | `getMaximumMagnitude()` Find the maximum magnitude of all points on the ellipsoid.
    `double` | `getMaximumXValue()` Find the maximum x value.
    `double` | `getMaximumYValue()` Find the maximum y value.
    `double` | `getMaximumZValue()` Find the maximum z value.
    `double` | `getMinimumMagnitude()` Find the minimum magnitude of all points on the ellipsoid.
    `double` | `getMinimumXValue()` Find the minimum x value.
    `double` | `getMinimumYValue()` Find the minimum y value.
    `double` | `getMinimumZValue()` Find the minimum z value.
    `int` | `hashCode()`
    `boolean` | `pointOnSurface(double x, double y, double z)` Check if point is on surface.
    `boolean` | `pointOnSurface(Vector v)` Check if point is on surface.
    `boolean` | `pointOutside(double x, double y, double z)` Check if point is outside surface.
    `boolean` | `pointOutside(Vector v)` Check if point is outside surface.
    `double` | `surfaceDistance(GeoPoint pt1, GeoPoint pt2)` Compute surface distance between two points.
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### SPHERE

          public static final PlanetModel SPHERE

      Planet model corresponding to sphere.

    - #### WGS84_MEAN

          public static final double WGS84_MEAN

      Mean radius
      See Also:
        Constant Field Values

    - #### WGS84_POLAR

          public static final double WGS84_POLAR

      Polar radius
      See Also:
        Constant Field Values

    - #### WGS84_EQUATORIAL

          public static final double WGS84_EQUATORIAL

      Equatorial radius
      See Also:
        Constant Field Values

    - #### WGS84

          public static final PlanetModel WGS84

      Planet model corresponding to WGS84

    - #### ab

          public final double ab

      The x/y scaling factor

    - #### c

          public final double c

      The z scaling factor

    - #### inverseAb

          public final double inverseAb

      The inverse of ab

    - #### inverseC

          public final double inverseC

      The inverse of c

    - #### inverseAbSquared

          public final double inverseAbSquared

      The square of the inverse of ab

    - #### inverseCSquared

          public final double inverseCSquared

      The square of the inverse of c

    - #### flattening

          public final double flattening

      The flattening value

    - #### squareRatio

          public final double squareRatio

      The square ratio

    - #### NORTH_POLE

          public final GeoPoint NORTH_POLE

      North pole

    - #### SOUTH_POLE

          public final GeoPoint SOUTH_POLE

      South pole

    - #### MIN_X_POLE

          public final GeoPoint MIN_X_POLE

      Min X pole

    - #### MAX_X_POLE

          public final GeoPoint MAX_X_POLE

      Max X pole

    - #### MIN_Y_POLE

          public final GeoPoint MIN_Y_POLE

      Min Y pole

    - #### MAX_Y_POLE

          public final GeoPoint MAX_Y_POLE

      Max Y pole

  - ### Constructor Detail

    - #### PlanetModel

          public PlanetModel(double ab,
                             double c)

      Constructor.
      Parameters:
        `ab` - is the x/y scaling factor.
        `c` - is the z scaling factor.

  - ### Method Detail

    - #### getMinimumMagnitude

          public double getMinimumMagnitude()

      Find the minimum magnitude of all points on the ellipsoid.
      Returns:
        the minimum magnitude for the planet.

    - #### getMaximumMagnitude

          public double getMaximumMagnitude()

      Find the maximum magnitude of all points on the ellipsoid.
      Returns:
        the maximum magnitude for the planet.

    - #### getMinimumXValue

          public double getMinimumXValue()

      Find the minimum x value.
      Returns:
        the minimum X value.

    - #### getMaximumXValue

          public double getMaximumXValue()

      Find the maximum x value.
      Returns:
        the maximum X value.

    - #### getMinimumYValue

          public double getMinimumYValue()

      Find the minimum y value.
      Returns:
        the minimum Y value.

    - #### getMaximumYValue

          public double getMaximumYValue()

      Find the maximum y value.
      Returns:
        the maximum Y value.

    - #### getMinimumZValue

          public double getMinimumZValue()

      Find the minimum z value.
      Returns:
        the minimum Z value.

    - #### getMaximumZValue

          public double getMaximumZValue()

      Find the maximum z value.
      Returns:
        the maximum Z value.

    - #### pointOnSurface

          public boolean pointOnSurface(Vector v)

      Check if point is on surface.
      Parameters:
        `v` - is the point to check.
      Returns:
        true if the point is on the planet surface.

    - #### pointOnSurface

          public boolean pointOnSurface(double x,
                                        double y,
                                        double z)

      Check if point is on surface.
      Parameters:
        `x` - is the x coord.
        `y` - is the y coord.
        `z` - is the z coord.

    - #### pointOutside

          public boolean pointOutside(Vector v)

      Check if point is outside surface.
      Parameters:
        `v` - is the point to check.
      Returns:
        true if the point is outside the planet surface.

    - #### pointOutside

          public boolean pointOutside(double x,
                                      double y,
                                      double z)

      Check if point is outside surface.
      Parameters:
        `x` - is the x coord.
        `y` - is the y coord.
        `z` - is the z coord.

    - #### createSurfacePoint

          public GeoPoint createSurfacePoint(Vector vector)

      Compute a GeoPoint that's scaled to actually be on the planet surface.
      Parameters:
        `vector` - is the vector.
      Returns:
        the scaled point.

    - #### createSurfacePoint

          public GeoPoint createSurfacePoint(double x,
                                             double y,
                                             double z)

      Compute a GeoPoint that's based on (x,y,z) values, but is scaled to actually be on the planet surface.
      Parameters:
        `x` - is the x value.
        `y` - is the y value.
        `z` - is the z value.
      Returns:
        the scaled point.

    - #### bisection

          public GeoPoint bisection(GeoPoint pt1,
                                    GeoPoint pt2)

      Compute a GeoPoint that's a bisection between two other GeoPoints.
      Parameters:
        `pt1` - is the first point.
        `pt2` - is the second point.
      Returns:
        the bisection point, or null if a unique one cannot be found.

    - #### surfaceDistance

          public double surfaceDistance(GeoPoint pt1,
                                        GeoPoint pt2)

      Compute surface distance between two points.
      Parameters:
        `pt1` - is the first point.
        `pt2` - is the second point.
      Returns:
        the adjusted angle, when multiplied by the mean earth radius, yields a surface distance. This will differ from GeoPoint.arcDistance() only when the planet model is not a sphere. @see `GeoPoint.arcDistance(Vector)`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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