パッケージ org.piax.common.subspace

クラス GeoRectangle

すべての実装されたインタフェース:
Shape, Serializable, Cloneable, Destination, GeoRegion, KeyContainable<Location>, Region<Location>

public class GeoRectangle
extends Rectangle2D
implements GeoRegion
The GeoRectangle class describes a geographical rectangle defined by a location (x,y) and dimension (width x height).
関連項目:
直列化された形式
  • コンストラクタの詳細

    • GeoRectangle

      public GeoRectangle()
      Constructs a new GeoRectangle, initialized to location (0,0) and size (0,0).
    • GeoRectangle

      public GeoRectangle​(double x, double y, double width, double height) throws IllegalArgumentException
      Constructs and initializes a GeoRectangle from the specified geographical coordinates.
      パラメータ:
      x - the longitude of the lower-left corner of the newly constructed GeoRectangle
      y - the latitude of the lower-left corner of the newly constructed GeoRectangle
      width - the width of the newly constructed GeoRectangle
      height - the height of the newly constructed GeoRectangle
      例外:
      IllegalArgumentException - if the specified arguments are geographically illegal.
    • GeoRectangle

      public GeoRectangle​(Point2D origin, double width, double height) throws IllegalArgumentException
      Constructs and initializes a GeoRectangle from the specified geographical coordinates.
      パラメータ:
      origin - the Location of the lower-left corner of the newly constructed GeoRectangle
      width - the width of the newly constructed GeoRectangle
      height - the height of the newly constructed GeoRectangle
      例外:
      IllegalArgumentException - if the specified arguments are geographically illegal.
  • メソッドの詳細

    • getLatitude

      public double getLatitude()
      Returns the latitude of the lower-left corner of the framing rectangle.
      戻り値:
      the latitude of the lower-left corner of the framing rectangle.
    • getLongitude

      public double getLongitude()
      Returns the longitude of the lower-left corner of the framing rectangle.
      戻り値:
      the longitude of the lower-left corner of the framing rectangle.
    • getX

      public double getX()
      Returns the X coordinate of the lower-left corner of the framing rectangle.
      定義:
      getX クラス内 RectangularShape
      戻り値:
      the X coordinate of the lower-left corner of the framing rectangle.
    • getY

      public double getY()
      Returns the Y coordinate of the lower-left corner of the framing rectangle.
      定義:
      getY クラス内 RectangularShape
      戻り値:
      the Y coordinate of the lower-left corner of the framing rectangle.
    • getWidth

      public double getWidth()
      定義:
      getWidth クラス内 RectangularShape
    • getHeight

      public double getHeight()
      定義:
      getHeight クラス内 RectangularShape
    • isEmpty

      public boolean isEmpty()
      定義:
      isEmpty クラス内 RectangularShape
    • setRect

      public void setRect​(double x, double y, double width, double height) throws IllegalArgumentException
      Sets the location and size of this GeoRectangle to the specified double values.
      定義:
      setRect クラス内 Rectangle2D
      パラメータ:
      x - the X coordinate to which to set the lower-left corner of this GeoRectangle
      y - the Y coordinate to which to set the lower-left corner of this GeoRectangle
      width - the value to use to set the width of this GeoRectangle
      height - the value to use to set the height of this GeoRectangle
      例外:
      IllegalArgumentException - if the specified arguments are geographically illegal.
    • setRect

      public void setRect​(Point2D origin, double width, double height) throws IllegalArgumentException
      Sets the location and size of this GeoRectangle to the specified values.
      パラメータ:
      origin - the location of the lower-left corner of this GeoRectangle
      width - the value to use to set the width of this GeoRectangle
      height - the value to use to set the height of this GeoRectangle
      例外:
      IllegalArgumentException - if the specified arguments are geographically illegal.
    • outcode

      public int outcode​(double x, double y)
      定義:
      outcode クラス内 Rectangle2D
    • add

      public void add​(double x, double y)
      オーバーライド:
      add クラス内 Rectangle2D
    • add

      public void add​(Rectangle2D r)
      オーバーライド:
      add クラス内 Rectangle2D
    • createIntersection

      public Rectangle2D createIntersection​(Rectangle2D r)
      定義:
      createIntersection クラス内 Rectangle2D
    • createUnion

      public Rectangle2D createUnion​(Rectangle2D r)
      定義:
      createUnion クラス内 Rectangle2D
    • contains

      public boolean contains​(double x, double y)
      定義:
      contains インタフェース内 Shape
      オーバーライド:
      contains クラス内 Rectangle2D
    • contains

      public boolean contains​(Location loc)
      定義:
      contains インタフェース内 KeyContainable<Location>
    • contains

      public boolean contains​(double x, double y, double w, double h)
      定義:
      contains インタフェース内 Shape
      オーバーライド:
      contains クラス内 Rectangle2D
    • intersects

      public boolean intersects​(double x, double y, double w, double h)
      定義:
      intersects インタフェース内 Shape
      オーバーライド:
      intersects クラス内 Rectangle2D
    • toString

      public String toString()
      Returns the String representation of this GeoRectangle.
      オーバーライド:
      toString クラス内 Object
      戻り値:
      a String representing this GeoRectangle.