org.apache.lucene.spatial.geometry.shape

## Class LLRect

- java.lang.Object
- - org.apache.lucene.spatial.geometry.shape.LLRect

-     public class LLRect
      extends java.lang.Object

  Lat-long rect. Instances are mutable.

  NOTE: This API is still in flux and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LLRect(LatLng ll, LatLng ur)`
    `LLRect(LLRect other)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `area()` Return the area in units of lat-lng squared.
    `static LLRect` | `createBox(LatLng center, double widthMi, double heightMi)` Approximates a box centered at the given point with the given width and height in miles.
    `boolean` | `equals(java.lang.Object obj)`
    `LatLng` | `getLowerLeft()`
    `LatLng` | `getMidpoint()`
    `LatLng` | `getUpperRight()`
    `int` | `hashCode()`
    `Rectangle` | `toRectangle()` Returns a rectangle shape for the bounding box
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### LLRect

          public LLRect(LatLng ll,
                        LatLng ur)

    - #### LLRect

          public LLRect(LLRect other)

  - ### Method Detail

    - #### area

          public double area()

      Return the area in units of lat-lng squared. This is a contrived unit that only has value when comparing to something else.

    - #### getLowerLeft

          public LatLng getLowerLeft()

    - #### getUpperRight

          public LatLng getUpperRight()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getMidpoint

          public LatLng getMidpoint()

    - #### createBox

          public static LLRect createBox(LatLng center,
                                         double widthMi,
                                         double heightMi)

      Approximates a box centered at the given point with the given width and height in miles.
      Parameters:
        `center` -
        `widthMi` -
        `heightMi` -

    - #### toRectangle

          public Rectangle toRectangle()

      Returns a rectangle shape for the bounding box

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

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