Package ucar.nc2.dt.ugrid.geom
Class GeoRectangle
- java.lang.Object
-
- ucar.nc2.dt.ugrid.geom.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.TheGeoRectangleclass provides a mechanism for manipulating rectangular regions on a geographically referenced plane.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeoRectangle.DoubleDeprecated.
-
Constructor Summary
Constructors Constructor Description GeoRectangle()Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract voidadd(GeoRectangle r)Deprecated.Adds aGeoRectangleobject to thisGeoRectangle.abstract voidadd(Polygon2D polygon)Deprecated.Extends this rectangle by the bounding box of the given polygon.booleancontains(double x, double y)Deprecated.booleancontains(double x, double y, double w, double h)Deprecated.not implemented; returns falsebooleancontains(Point2D p)Deprecated.booleancontains(Rectangle2D r)Deprecated.booleancontains(GeoRectangle r)Deprecated.booleancontains(Polygon2D p)Deprecated.abstract GeoRectanglecopy()Deprecated.Retrieves a copy of thisGeoRectangleobject with the exact same bounding coordinates.abstract booleanequals(Object obj)Deprecated.doublegetArea()Deprecated.Calculates the area of thisGeoRectangleobjectabstract Polygon2DgetBackingPolygon()Deprecated.Retrieves a copy of the 4-point polygon representation of thisGeoRectangleRectanglegetBounds()Deprecated.not implemented; returns falseRectangle2DgetBounds2D()Deprecated.not implemented; returns falsePoint2DgetCentroid()Deprecated.doublegetHeight()Deprecated.Calculates the height of this rectangleabstract Point2DgetLowerLeft()Deprecated.Retrieves the lower-left point of this rectangleabstract doublegetMaxX()Deprecated.Determines the lowest x value within the points of this rectangleabstract doublegetMaxY()Deprecated.Determines the lowest x value within the points of this rectangleabstract doublegetMinX()Deprecated.Determines the lowest x value within the points of this rectangleabstract doublegetMinY()Deprecated.Determines the lowest x value within the points of this rectanglePathIteratorgetPathIterator(AffineTransform at)Deprecated.not implemented; returns falsePathIteratorgetPathIterator(AffineTransform at, double flatness)Deprecated.not implemented; returns falseabstract Point2DgetUpperRight()Deprecated.Retrieves the upper-right point of this rectangledoublegetWidth()Deprecated.Calculates the width of this rectangledouble[]getXCoords()Deprecated.double[]getYCoords()Deprecated.booleanintersects(double x, double y, double w, double h)Deprecated.not implemented; returns falsebooleanintersects(Rectangle2D r)Deprecated.not implemented; returns falsebooleanintersects(GeoRectangle r)Deprecated.booleanisEmpty()Deprecated.Determines whether or not thisGeoRectangleis empty.abstract voidsetRect(double xCorner1, double yCorner1, double xCorner2, double yCorner2)Deprecated.Set the coordinates of this rectangle by its lower-left and upper-right pointsvoidsetRect(Point2D corner1, Point2D corner2)Deprecated.Set the coordinates of this rectangle to the coordinates of the two points.voidsetRect(GeoRectangle rect)Deprecated.Set the coordinates of this rectangle to the same coordinates of the given rectangleStringtoString()Deprecated.static voidunion(GeoRectangle src1, GeoRectangle src2, GeoRectangle dest)Deprecated.Unions the pair of sourceRectangle2Dobjects and puts the result into the specified destinationRectangle2Dobject.
-
-
-
Field Detail
-
polygon
protected Polygon2D polygon
Deprecated.The polygon backing for this rectangle object
-
-
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 thisGeoRectanglewith the rectangle representing the bounds of the givenPolygon2D- Parameters:
polygon- Apolygonobject
-
add
public abstract void add(GeoRectangle r)
Deprecated.Adds aGeoRectangleobject to thisGeoRectangle. The resultingGeoRectangleis the union of the twoGeoRectangleobjects.- Parameters:
r- theRectangle2Dto add to thisRectangle2D.
-
getLowerLeft
public abstract Point2D getLowerLeft()
Deprecated.Retrieves the lower-left point of this rectangle- Returns:
- a
Point2Dobject
-
getUpperRight
public abstract Point2D getUpperRight()
Deprecated.Retrieves the upper-right point of this rectangle- Returns:
- a
Point2Dobject
-
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 thisGeoRectangleobject- Returns:
- the area of this
GeoRectangle
-
getCentroid
public Point2D getCentroid()
Deprecated.
-
contains
public boolean contains(Rectangle2D r)
Deprecated.
-
contains
public boolean contains(GeoRectangle r)
Deprecated.
-
contains
public boolean contains(Polygon2D p)
Deprecated.
-
contains
public boolean contains(double x, double y)Deprecated.
-
contains
public boolean contains(double x, double y, double w, double h)Deprecated.not implemented; returns false
-
copy
public abstract GeoRectangle copy()
Deprecated.Retrieves a copy of thisGeoRectangleobject 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 thisGeoRectangle- Returns:
- a
Polygon2Dobject
-
getBounds
public Rectangle getBounds()
Deprecated.not implemented; returns false
-
getBounds2D
public Rectangle2D getBounds2D()
Deprecated.not implemented; returns false- Specified by:
getBounds2Din interfaceShape
-
getPathIterator
public PathIterator getPathIterator(AffineTransform at)
Deprecated.not implemented; returns false- Specified by:
getPathIteratorin interfaceShape
-
getPathIterator
public PathIterator getPathIterator(AffineTransform at, double flatness)
Deprecated.not implemented; returns false- Specified by:
getPathIteratorin interfaceShape
-
intersects
public boolean intersects(Rectangle2D r)
Deprecated.not implemented; returns false- Specified by:
intersectsin interfaceShape
-
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:
intersectsin interfaceShape
-
isEmpty
public boolean isEmpty()
Deprecated.Determines whether or not thisGeoRectangleis empty.- Returns:
trueif thisGeoRectangleis empty;falseotherwise.
-
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 rectangleyCorner1- the y coordinate of the first corner of this rectanglexCorner2- the x coordinate of the opposite corner of this rectangleyCorner2- 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- aGeoRectangleobject
-
union
public static void union(GeoRectangle src1, GeoRectangle src2, GeoRectangle dest)
Deprecated.Unions the pair of sourceRectangle2Dobjects and puts the result into the specified destinationRectangle2Dobject. 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 ofRectangle2Dobjects to be combined with each othersrc2- the second of a pair ofRectangle2Dobjects to be combined with each otherdest- theRectangle2Dthat holds the results of the union ofsrc1andsrc2- Since:
- 1.2
-
-