public final class GridRect extends Object
Modifier and Type | Field and Description |
---|---|
double |
maxX
Right-most coordinate in metres
|
double |
maxY |
double |
minX
Left-most coordinate, in metres
|
double |
minY |
Constructor and Description |
---|
GridRect(double x0,
double y0,
double x1,
double y1)
Construct a GridRect
|
Modifier and Type | Method and Description |
---|---|
GridPoint |
center()
Returns a
GridPoint corresponding to the approximate center (may allocate an object). |
static GridRect |
fromCentreXYWH(double cX,
double cY,
double w,
double h)
Construct a GridRect with a centre coordinate and a width/height in metres.
|
GridPoint |
ne()
Returns a
GridPoint corresponding to the NE corner (may allocate an object). |
GridPoint |
nw()
Returns a
GridPoint corresponding to the NW corner (may allocate an object). |
GridPoint |
se()
Returns a
GridPoint corresponding to the SE corner (may allocate an object). |
GridPoint |
sw()
Returns a
GridPoint corresponding to the SW corner (may allocate an object). |
public final double minX
public final double maxX
public final double minY
public final double maxY
public GridRect(double x0, double y0, double x1, double y1)
x0
- South-West Eastingsy0
- South-West Northingsx1
- North-East Eastingsy1
- North-East Northingspublic static GridRect fromCentreXYWH(double cX, double cY, double w, double h)
cX
- Centre EastingscY
- Centre Northingsw
- Width in metresh
- Height in metrespublic GridPoint sw()
GridPoint
corresponding to the SW corner (may allocate an object).GridPoint
for the SW cornerpublic GridPoint ne()
GridPoint
corresponding to the NE corner (may allocate an object).GridPoint
for the NE cornerpublic GridPoint nw()
GridPoint
corresponding to the NW corner (may allocate an object).GridPoint
for the NW cornerpublic GridPoint se()
GridPoint
corresponding to the SE corner (may allocate an object).GridPoint
for the SE cornerCopyright © 2012–2013 Ordnance Survey. All rights reserved.