Class GeoRectangle

  • All Implemented Interfaces:
    Shape, Serializable
    Direct Known Subclasses:
    GeoRectangle.Double

    @Deprecated
    public abstract class GeoRectangle
    extends Object
    implements Shape, Serializable
    Deprecated.
    This class does not handle the dateline properly. Use the LatLonRectangle2D class instead.
    The GeoRectangle class provides a mechanism for manipulating rectangular regions on a geographically referenced plane.
    See Also:
    Serialized Form
    • Field Detail

      • polygon

        protected Polygon2D polygon
        Deprecated.
        The polygon backing for this rectangle object
    • Constructor Detail

      • GeoRectangle

        public GeoRectangle()
        Deprecated.
    • Method Detail

      • add

        public abstract void add​(Polygon2D polygon)
        Deprecated.
        Extends this rectangle by the bounding box of the given polygon. The resulting rectangle is the union of this GeoRectangle with the rectangle representing the bounds of the given Polygon2D
        Parameters:
        polygon - A polygon object
      • add

        public abstract void add​(GeoRectangle r)
        Deprecated.
        Adds a GeoRectangle object to this GeoRectangle. The resulting GeoRectangle is the union of the two GeoRectangle objects.
        Parameters:
        r - the Rectangle2D to add to this Rectangle2D.
      • equals

        public abstract boolean equals​(Object obj)
        Deprecated.
        Overrides:
        equals in class Object
      • getLowerLeft

        public abstract Point2D getLowerLeft()
        Deprecated.
        Retrieves the lower-left point of this rectangle
        Returns:
        a Point2D object
      • getUpperRight

        public abstract Point2D getUpperRight()
        Deprecated.
        Retrieves the upper-right point of this rectangle
        Returns:
        a Point2D object
      • getMinX

        public abstract double getMinX()
        Deprecated.
        Determines the lowest x value within the points of this rectangle
        Returns:
        the lowest x value
      • getMinY

        public abstract double getMinY()
        Deprecated.
        Determines the lowest x value within the points of this rectangle
        Returns:
        the lowest x value
      • getMaxX

        public abstract double getMaxX()
        Deprecated.
        Determines the lowest x value within the points of this rectangle
        Returns:
        the lowest x value
      • getMaxY

        public abstract double getMaxY()
        Deprecated.
        Determines the lowest x value within the points of this rectangle
        Returns:
        the lowest x value
      • getXCoords

        public double[] getXCoords()
        Deprecated.
      • getYCoords

        public double[] getYCoords()
        Deprecated.
      • getHeight

        public double getHeight()
        Deprecated.
        Calculates the height of this rectangle
        Returns:
        the height of this rectangle
      • getWidth

        public double getWidth()
        Deprecated.
        Calculates the width of this rectangle
        Returns:
        the width of this rectangle
      • getArea

        public double getArea()
        Deprecated.
        Calculates the area of this GeoRectangle object
        Returns:
        the area of this GeoRectangle
      • getCentroid

        public Point2D getCentroid()
        Deprecated.
      • contains

        public boolean contains​(Point2D p)
        Deprecated.
        Specified by:
        contains in interface Shape
      • contains

        public boolean contains​(GeoRectangle r)
        Deprecated.
      • contains

        public boolean contains​(Polygon2D p)
        Deprecated.
      • contains

        public boolean contains​(double x,
                                double y)
        Deprecated.
        Specified by:
        contains in interface Shape
      • contains

        public boolean contains​(double x,
                                double y,
                                double w,
                                double h)
        Deprecated.
        not implemented; returns false
        Specified by:
        contains in interface Shape
      • copy

        public abstract GeoRectangle copy()
        Deprecated.
        Retrieves a copy of this GeoRectangle object with the exact same bounding coordinates. The backing polygon associated with this copy may have its nodes in a different order than the original.
        Returns:
        a GeoRectangle
      • getBackingPolygon

        public abstract Polygon2D getBackingPolygon()
        Deprecated.
        Retrieves a copy of the 4-point polygon representation of this GeoRectangle
        Returns:
        a Polygon2D object
      • getBounds

        public Rectangle getBounds()
        Deprecated.
        not implemented; returns false
        Specified by:
        getBounds in interface Shape
      • getBounds2D

        public Rectangle2D getBounds2D()
        Deprecated.
        not implemented; returns false
        Specified by:
        getBounds2D in interface Shape
      • intersects

        public boolean intersects​(Rectangle2D r)
        Deprecated.
        not implemented; returns false
        Specified by:
        intersects in interface Shape
      • intersects

        public boolean intersects​(GeoRectangle r)
        Deprecated.
      • intersects

        public boolean intersects​(double x,
                                  double y,
                                  double w,
                                  double h)
        Deprecated.
        not implemented; returns false
        Specified by:
        intersects in interface Shape
      • isEmpty

        public boolean isEmpty()
        Deprecated.
        Determines whether or not this GeoRectangle is empty.
        Returns:
        true if this GeoRectangle is empty; false otherwise.
      • setRect

        public abstract void setRect​(double xCorner1,
                                     double yCorner1,
                                     double xCorner2,
                                     double yCorner2)
        Deprecated.
        Set the coordinates of this rectangle by its lower-left and upper-right points
        Parameters:
        xCorner1 - the x coordinate of the first corner of this rectangle
        yCorner1 - the y coordinate of the first corner of this rectangle
        xCorner2 - the x coordinate of the opposite corner of this rectangle
        yCorner2 - the y coordinate of the opposite corner of this rectangle
      • setRect

        public void setRect​(Point2D corner1,
                            Point2D corner2)
        Deprecated.
        Set the coordinates of this rectangle to the coordinates of the two points. These points should be "opposite" corners of the rectangle.
        Parameters:
        corner1 - the first corner (i.e. lower_left)
        corner2 - the second corner (i.e. upper_right)
      • setRect

        public void setRect​(GeoRectangle rect)
        Deprecated.
        Set the coordinates of this rectangle to the same coordinates of the given rectangle
        Parameters:
        rect - a GeoRectangle object
      • union

        public static void union​(GeoRectangle src1,
                                 GeoRectangle src2,
                                 GeoRectangle dest)
        Deprecated.
        Unions the pair of source Rectangle2D objects and puts the result into the specified destination Rectangle2D object. One of the source rectangles can also be the destination to avoid creating a third Rectangle2D object, but in this case the original points of this source rectangle will be overwritten by this method.
        Parameters:
        src1 - the first of a pair of Rectangle2D objects to be combined with each other
        src2 - the second of a pair of Rectangle2D objects to be combined with each other
        dest - the Rectangle2D that holds the results of the union of src1 and src2
        Since:
        1.2