Package org.apache.lucene.spatial3d.geom

## Interface GeoArea

- All Superinterfaces:
    `Membership`
  All Known Subinterfaces:
    `GeoAreaShape`, `GeoBBox`, `GeoCircle`, `GeoDistanceShape`, `GeoPath`, `GeoPointShape`, `GeoPolygon`, `XYZSolid`
  All Known Implementing Classes:
    `GeoBaseDistanceShape`, `GeoCompositeAreaShape`, `GeoCompositePolygon`, `GeoDegenerateVerticalLine`

      public interface GeoArea
      extends Membership

  A GeoArea represents a standard 2-D breakdown of a part of sphere. It can be bounded in latitude, or bounded in both latitude and longitude, or not bounded at all. The purpose of the interface is to describe bounding shapes used for computation of geo hashes.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `CONTAINS` | The referenced shape CONTAINS this area
    `static int` | `DISJOINT` | The referenced shape has no relation to this area
    `static int` | `OVERLAPS` | The referenced shape OVERLAPS this area
    `static int` | `WITHIN` | The referenced shape IS WITHIN this area

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getRelationship​(GeoShape shape)` | Find the spatial relationship between a shape and the current geo area.

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

      `isWithin, isWithin`

- - ### Field Detail

    - #### CONTAINS

          static final int CONTAINS

      The referenced shape CONTAINS this area
      See Also:
        Constant Field Values

    - #### WITHIN

          static final int WITHIN

      The referenced shape IS WITHIN this area
      See Also:
        Constant Field Values

    - #### OVERLAPS

          static final int OVERLAPS

      The referenced shape OVERLAPS this area
      See Also:
        Constant Field Values

    - #### DISJOINT

          static final int DISJOINT

      The referenced shape has no relation to this area
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getRelationship

          int getRelationship​(GeoShape shape)

      Find the spatial relationship between a shape and the current geo area. Note: return value is how the GeoShape relates to the GeoArea, not the other way around. For example, if this GeoArea is entirely within the shape, then CONTAINS should be returned. If the shape is entirely enclosed by this GeoArea, then WITHIN should be returned.

      It is permissible to return OVERLAPS instead of WITHIN if the shape intersects with the area at even a single point. So, a circle inscribed in a rectangle could return either OVERLAPS or WITHIN, depending on implementation. It is not permissible to return CONTAINS or DISJOINT in this circumstance, however.

      Similarly, it is permissible to return OVERLAPS instead of CONTAINS under conditions where the shape consists of multiple independent overlapping subshapes, and the area overlaps one of the subshapes. It is not permissible to return WITHIN or DISJOINT in this circumstance, however.

      Parameters:
        `shape` - is the shape to consider.
      Returns:
        the relationship, from the perspective of the shape.