org.apache.lucene.geo3d

## Class GeoStandardCircle

- java.lang.Object
- - org.apache.lucene.geo3d.BasePlanetObject
  - - org.apache.lucene.geo3d.GeoBaseShape
    - - org.apache.lucene.geo3d.GeoBaseMembershipShape
      - - org.apache.lucene.geo3d.GeoBaseDistanceShape
        - - org.apache.lucene.geo3d.GeoBaseCircle
          - - org.apache.lucene.geo3d.GeoStandardCircle

- All Implemented Interfaces:
    GeoCircle, GeoDistance, GeoDistanceShape, GeoMembershipShape, GeoOutsideDistance, GeoShape, GeoSizeable, Membership

      public class GeoStandardCircle
      extends GeoBaseCircle

  Circular area with a center and radius.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected GeoPoint` | `center` Center of circle
    `protected SidedPlane` | `circlePlane` The plane describing the circle (really an ellipse on a non-spherical world)
    `protected static GeoPoint[]` | `circlePoints` Notable points for a circle -- there aren't any
    `protected double` | `cutoffAngle` Cutoff angle of circle (not quite the same thing as radius)
    `protected GeoPoint[]` | `edgePoints` A point that is on the world and on the circle plane

    - ### Fields inherited from class org.apache.lucene.geo3d.BasePlanetObject

      `planetModel`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GeoStandardCircle(PlanetModel planetModel, double lat, double lon, double cutoffAngle)` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected double` | `distance(DistanceStyle distanceStyle, double x, double y, double z)` Called by a `computeDistance` method if X/Y/Z is not within this shape.
    `boolean` | `equals(Object o)`
    `void` | `getBounds(Bounds bounds)` Compute bounds for the shape.
    `GeoPoint` | `getCenter()` Returns the center of a circle into which the area will be inscribed.
    `GeoPoint[]` | `getEdgePoints()` Return a sample point that is on the outside edge/boundary of the shape.
    `double` | `getRadius()` Returns the radius of a circle into which the GeoSizeable area can be inscribed.
    `int` | `hashCode()`
    `boolean` | `intersects(Plane p, GeoPoint[] notablePoints, Membership... bounds)` Assess whether a plane, within the provided bounds, intersects with the shape.
    `boolean` | `isWithin(double x, double y, double z)` Check if a point is within this shape.
    `protected double` | `outsideDistance(DistanceStyle distanceStyle, double x, double y, double z)` Called by a `computeOutsideDistance` method if X/Y/Z is not within this shape.
    `String` | `toString()`

    - ### Methods inherited from class org.apache.lucene.geo3d.GeoBaseDistanceShape

      `computeDistance, computeDistance, isWithin`

    - ### Methods inherited from class org.apache.lucene.geo3d.GeoBaseMembershipShape

      `computeOutsideDistance, computeOutsideDistance`

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

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

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

      `computeOutsideDistance, computeOutsideDistance`

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

      `isWithin`

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

      `computeDistance, computeDistance`

- - ### Field Detail

    - #### center

          protected final GeoPoint center

      Center of circle

    - #### cutoffAngle

          protected final double cutoffAngle

      Cutoff angle of circle (not quite the same thing as radius)

    - #### circlePlane

          protected final SidedPlane circlePlane

      The plane describing the circle (really an ellipse on a non-spherical world)

    - #### edgePoints

          protected final GeoPoint[] edgePoints

      A point that is on the world and on the circle plane

    - #### circlePoints

          protected static final GeoPoint[] circlePoints

      Notable points for a circle -- there aren't any

  - ### Constructor Detail

    - #### GeoStandardCircle

          public GeoStandardCircle(PlanetModel planetModel,
                           double lat,
                           double lon,
                           double cutoffAngle)

      Constructor.
      Parameters:
        `planetModel` - is the planet model.
        `lat` - is the center latitude.
        `lon` - is the center longitude.
        `cutoffAngle` - is the cutoff angle for the circle.

  - ### Method Detail

    - #### getRadius

          public double getRadius()

      Description copied from interface: `GeoSizeable`
      Returns the radius of a circle into which the GeoSizeable area can be inscribed.
      Returns:
        the radius.

    - #### getCenter

          public GeoPoint getCenter()

      Description copied from interface: `GeoSizeable`
      Returns the center of a circle into which the area will be inscribed.
      Returns:
        the center.

    - #### distance

          protected double distance(DistanceStyle distanceStyle,
                        double x,
                        double y,
                        double z)

      Description copied from class: `GeoBaseDistanceShape`
      Called by a `computeDistance` method if X/Y/Z is not within this shape.
      Specified by:
        `distance` in class `GeoBaseDistanceShape`

    - #### outsideDistance

          protected double outsideDistance(DistanceStyle distanceStyle,
                               double x,
                               double y,
                               double z)

      Description copied from class: `GeoBaseMembershipShape`
      Called by a `computeOutsideDistance` method if X/Y/Z is not within this shape.
      Specified by:
        `outsideDistance` in class `GeoBaseMembershipShape`

    - #### isWithin

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

      Description copied from interface: `Membership`
      Check if a point is within this shape.
      Parameters:
        `x` - is x coordinate of point to check.
        `y` - is y coordinate of point to check.
        `z` - is z coordinate of point to check.
      Returns:
        true if the point is within this shape

    - #### getEdgePoints

          public GeoPoint[] getEdgePoints()

      Description copied from interface: `GeoShape`
      Return a sample point that is on the outside edge/boundary of the shape.
      Returns:
        samples of all edge points from distinct edge sections. Typically one point is returned, but zero or two are also possible.

    - #### intersects

          public boolean intersects(Plane p,
                           GeoPoint[] notablePoints,
                           Membership... bounds)

      Description copied from interface: `GeoShape`
      Assess whether a plane, within the provided bounds, intersects with the shape. Note well that this method is allowed to return "true" if there are internal edges of a composite shape which intersect the plane. Doing this can cause getRelationship() for most GeoBBox shapes to return OVERLAPS rather than the more correct CONTAINS, but that cannot be helped for some complex shapes that are built out of overlapping parts.
      Parameters:
        `p` - is the plane to assess for intersection with the shape's edges or bounding curves.
        `notablePoints` - represents the intersections of the plane with the supplied bounds. These are used to disambiguate when two planes are identical and it needs to be determined whether any points exist that fulfill all the bounds.
        `bounds` - are a set of bounds that define an area that an intersection must be within in order to qualify (provided by a GeoArea).
      Returns:
        true if there's such an intersection, false if not.

    - #### getBounds

          public void getBounds(Bounds bounds)

      Description copied from interface: `GeoShape`
      Compute bounds for the shape.
      Specified by:
        `getBounds` in interface `GeoShape`
      Overrides:
        `getBounds` in class `GeoBaseShape`
      Parameters:
        `bounds` - is the input bounds object. The input object will be modified.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `BasePlanetObject`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `BasePlanetObject`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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