org.apache.lucene.spatial.spatial4j

## Class Geo3dShape

- java.lang.Object
- - org.apache.lucene.spatial.spatial4j.Geo3dShape

- All Implemented Interfaces:
    com.spatial4j.core.shape.Shape

      public class Geo3dShape
      extends Object
      implements com.spatial4j.core.shape.Shape

  A Spatial4j Shape wrapping a `GeoShape` ("Geo3D") -- a 3D planar geometry based Spatial4j Shape implementation. Geo3D implements shapes on the surface of a sphere or ellipsoid.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `com.spatial4j.core.context.SpatialContext` | `ctx`
    `PlanetModel` | `planetModel`
    `protected static double` | `ROUNDOFF_ADJUSTMENT` The required size of this adjustment depends on the actual planetary model chosen.
    `GeoShape` | `shape`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Geo3dShape(GeoShape shape, com.spatial4j.core.context.SpatialContext ctx)`
    `Geo3dShape(PlanetModel planetModel, GeoShape shape, com.spatial4j.core.context.SpatialContext ctx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)`
    `double` | `getArea(com.spatial4j.core.context.SpatialContext ctx)`
    `com.spatial4j.core.shape.Rectangle` | `getBoundingBox()`
    `com.spatial4j.core.shape.Shape` | `getBuffered(double distance, com.spatial4j.core.context.SpatialContext ctx)`
    `com.spatial4j.core.shape.Point` | `getCenter()`
    `com.spatial4j.core.context.SpatialContext` | `getContext()`
    `boolean` | `hasArea()`
    `int` | `hashCode()`
    `boolean` | `isEmpty()`
    `protected com.spatial4j.core.shape.SpatialRelation` | `relate(com.spatial4j.core.shape.Point p)`
    `protected com.spatial4j.core.shape.SpatialRelation` | `relate(com.spatial4j.core.shape.Rectangle r)`
    `com.spatial4j.core.shape.SpatialRelation` | `relate(com.spatial4j.core.shape.Shape other)`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### ROUNDOFF_ADJUSTMENT

          protected static final double ROUNDOFF_ADJUSTMENT

      The required size of this adjustment depends on the actual planetary model chosen. This value is big enough to account for WGS84.
      See Also:
        Constant Field Values

    - #### ctx

          public final com.spatial4j.core.context.SpatialContext ctx

    - #### shape

          public final GeoShape shape

    - #### planetModel

          public final PlanetModel planetModel

  - ### Constructor Detail

    - #### Geo3dShape

          public Geo3dShape(GeoShape shape,
                    com.spatial4j.core.context.SpatialContext ctx)

    - #### Geo3dShape

          public Geo3dShape(PlanetModel planetModel,
                    GeoShape shape,
                    com.spatial4j.core.context.SpatialContext ctx)

  - ### Method Detail

    - #### getContext

          public com.spatial4j.core.context.SpatialContext getContext()

      Specified by:
        `getContext` in interface `com.spatial4j.core.shape.Shape`

    - #### relate

          public com.spatial4j.core.shape.SpatialRelation relate(com.spatial4j.core.shape.Shape other)

      Specified by:
        `relate` in interface `com.spatial4j.core.shape.Shape`

    - #### relate

          protected com.spatial4j.core.shape.SpatialRelation relate(com.spatial4j.core.shape.Rectangle r)

    - #### relate

          protected com.spatial4j.core.shape.SpatialRelation relate(com.spatial4j.core.shape.Point p)

    - #### getBoundingBox

          public com.spatial4j.core.shape.Rectangle getBoundingBox()

      Specified by:
        `getBoundingBox` in interface `com.spatial4j.core.shape.Shape`

    - #### hasArea

          public boolean hasArea()

      Specified by:
        `hasArea` in interface `com.spatial4j.core.shape.Shape`

    - #### getArea

          public double getArea(com.spatial4j.core.context.SpatialContext ctx)

      Specified by:
        `getArea` in interface `com.spatial4j.core.shape.Shape`

    - #### getCenter

          public com.spatial4j.core.shape.Point getCenter()

      Specified by:
        `getCenter` in interface `com.spatial4j.core.shape.Shape`

    - #### getBuffered

          public com.spatial4j.core.shape.Shape getBuffered(double distance,
                                                   com.spatial4j.core.context.SpatialContext ctx)

      Specified by:
        `getBuffered` in interface `com.spatial4j.core.shape.Shape`

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `com.spatial4j.core.shape.Shape`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object other)

      Specified by:
        `equals` in interface `com.spatial4j.core.shape.Shape`
      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

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