org.apache.lucene.spatial3d.geom

## Interface GeoShape

- All Superinterfaces:
    Membership
  All Known Subinterfaces:
    GeoBBox, GeoCircle, GeoDistanceShape, GeoMembershipShape, GeoPath, GeoPolygon
  All Known Implementing Classes:
    GeoBaseDistanceShape, GeoBaseMembershipShape, GeoBaseShape, GeoCompositeMembershipShape, GeoCompositePolygon, GeoDegenerateVerticalLine

      public interface GeoShape
      extends Membership

  Generic shape. This describes methods that help GeoAreas figure out how they interact with a shape, for the purposes of coming up with a set of geo hash values.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `getBounds(Bounds bounds)` Compute bounds for the shape.
    `GeoPoint[]` | `getEdgePoints()` Return a sample point that is on the outside edge/boundary of the shape.
    `boolean` | `intersects(Plane plane, GeoPoint[] notablePoints, Membership... bounds)` Assess whether a plane, within the provided bounds, intersects with the shape.

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

      `isWithin, isWithin`

- - ### Method Detail

    - #### getEdgePoints

          GeoPoint[] getEdgePoints()

      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

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

      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:
        `plane` - 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

          void getBounds(Bounds bounds)

      Compute bounds for the shape.
      Parameters:
        `bounds` - is the input bounds object. The input object will be modified.

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