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.
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:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidadd(GeoRectangle r) Deprecated.Adds aGeoRectangleobject to thisGeoRectangle.abstract voidDeprecated.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 falsebooleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.abstract GeoRectanglecopy()Deprecated.Retrieves a copy of thisGeoRectangleobject with the exact same bounding coordinates.abstract booleanDeprecated.doublegetArea()Deprecated.Calculates the area of thisGeoRectangleobjectabstract Polygon2DDeprecated.Retrieves a copy of the 4-point polygon representation of thisGeoRectangleDeprecated.not implemented; returns falseDeprecated.not implemented; returns falseDeprecated.doubleDeprecated.Calculates the height of this rectangleabstract Point2DDeprecated.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 rectangleDeprecated.not implemented; returns falsegetPathIterator(AffineTransform at, double flatness) Deprecated.not implemented; returns falseabstract Point2DDeprecated.Retrieves the upper-right point of this rectangledoublegetWidth()Deprecated.Calculates the width of this rectangledouble[]Deprecated.double[]Deprecated.booleanintersects(double x, double y, double w, double h) Deprecated.not implemented; returns falsebooleanDeprecated.not implemented; returns falsebooleanDeprecated.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 pointsvoidDeprecated.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 rectangletoString()Deprecated.static voidunion(GeoRectangle src1, GeoRectangle src2, GeoRectangle dest) Deprecated.Unions the pair of sourceRectangle2Dobjects and puts the result into the specified destinationRectangle2Dobject.
-
Field Details
-
polygon
Deprecated.The polygon backing for this rectangle object
-
-
Constructor Details
-
GeoRectangle
public GeoRectangle()Deprecated.
-
-
Method Details
-
add
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
Deprecated.Adds aGeoRectangleobject to thisGeoRectangle. The resultingGeoRectangleis the union of the twoGeoRectangleobjects.- Parameters:
r- theRectangle2Dto add to thisRectangle2D.
-
equals
Deprecated. -
getLowerLeft
Deprecated.Retrieves the lower-left point of this rectangle- Returns:
- a
Point2Dobject
-
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
Deprecated. -
contains
Deprecated. -
contains
Deprecated. -
contains
Deprecated. -
contains
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
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
Deprecated.Retrieves a copy of the 4-point polygon representation of thisGeoRectangle- Returns:
- a
Polygon2Dobject
-
getBounds
Deprecated.not implemented; returns false -
getBounds2D
Deprecated.not implemented; returns false- Specified by:
getBounds2Din interfaceShape
-
getPathIterator
Deprecated.not implemented; returns false- Specified by:
getPathIteratorin interfaceShape
-
getPathIterator
Deprecated.not implemented; returns false- Specified by:
getPathIteratorin interfaceShape
-
intersects
Deprecated.not implemented; returns false- Specified by:
intersectsin interfaceShape
-
intersects
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
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
Deprecated.Set the coordinates of this rectangle to the same coordinates of the given rectangle- Parameters:
rect- aGeoRectangleobject
-
toString
Deprecated. -
union
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
-