public class GridExtentImpl extends ExtentImpl implements GridExtent
ExtentImpl.Has
PERSISTENT_DESCRIPTION, PERSISTENT_NAME
Constructor and Description |
---|
GridExtentImpl() |
GridExtentImpl(double minX,
double minY,
double maxX,
double maxY,
double dCellSize)
Assign the extension value and cell size.
|
GridExtentImpl(double minX,
double minY,
double maxX,
double maxY,
double dCellSizeX,
double dCellSizeY)
Assign the extension value and cell size.
|
GridExtentImpl(Extent extent,
double dCellSize)
Assign the extension value and cell size.
|
GridExtentImpl(Extent extent,
double dCellSizeX,
double dCellSizeY)
Assign the extension value and cell size.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double x,
double y) |
boolean |
equals(GridExtent extent)
Compare a extent with the current GridExtent
|
boolean |
fitsIn(GridExtent extent) |
double |
getCellSize()
Get cell size
|
double |
getCellSizeX() |
double |
getCellSizeY() |
GridCellImpl |
getGridCoordsFromWorldCoords(Point2D pt)
Add the layer extent as current extent
|
int |
getNX()
Get pixel width
|
int |
getNY()
Get pixel height
|
Point2D |
getWorldCoordsFromGridCoords(GridCellImpl cell) |
void |
setCellSize(double cellSize)
Set cell size and recalculate pixel distance in both axis
|
void |
setCellSizeX(double cellSizeX) |
void |
setCellSizeY(double cellSizeY) |
void |
setXRange(double dXMin,
double dXMax) |
void |
setYRange(double dYMin,
double dYMax) |
add, add, clone, convert, encloseBoundinBoxes, equals, finalize, getCenterX, getCenterY, getGridExtent, getLLX, getLLY, getLR, getLRX, getLRY, getMax, getMin, getScale, getScale, getUL, getULX, getULY, getURX, getURY, height, intersection, intersects, isAt, loadFromState, maxX, maxY, minX, minY, rasterToWorld, registerPersistence, saveToState, setLRXToMax, setLRXToMin, setLRYToMax, setLRYToMin, setULXToMax, setULXToMin, setULYToMax, setULYToMin, toRectangle2D, toString, width, worldToRaster
getClass, hashCode, notify, notifyAll, wait, wait, wait
clone, convert, encloseBoundinBoxes, equals, getCenterX, getCenterY, getGridExtent, getLLX, getLLY, getLR, getLRX, getLRY, getMax, getMin, getScale, getScale, getUL, getULX, getULY, getURX, getURY, height, intersection, intersects, maxX, maxY, minX, minY, rasterToWorld, setLRXToMax, setLRXToMin, setLRYToMax, setLRYToMin, setULXToMax, setULXToMin, setULYToMax, setULYToMin, toRectangle2D, width, worldToRaster
loadFromState, saveToState
public GridExtentImpl()
public GridExtentImpl(double minX, double minY, double maxX, double maxY, double dCellSize)
minX
- minimun value in X coordinateminY
- minimun value in Y coordinatemaxX
- maximun value in X coordinatemaxY
- maximun value in Y coordinatedCellSize
- cell sizepublic GridExtentImpl(Extent extent, double dCellSize)
minX
- minimun value in X coordinateminY
- minimun value in Y coordinatemaxX
- maximun value in X coordinatemaxY
- maximun value in Y coordinatedCellSize
- cell sizepublic GridExtentImpl(double minX, double minY, double maxX, double maxY, double dCellSizeX, double dCellSizeY)
minX
- minimun value in X coordinateminY
- minimun value in Y coordinatemaxX
- maximun value in X coordinatemaxY
- maximun value in Y coordinatedCellSizeX
- cell size in X coordinatedCellSizeX
- cell size in X coordinatepublic GridExtentImpl(Extent extent, double dCellSizeX, double dCellSizeY)
minX
- minimun value in X coordinateminY
- minimun value in Y coordinatemaxX
- maximun value in X coordinatemaxY
- maximun value in Y coordinatedCellSizeX
- cell size in X coordinatedCellSizeX
- cell size in X coordinatepublic void setXRange(double dXMin, double dXMax)
setXRange
in interface GridExtent
public void setYRange(double dYMin, double dYMax)
setYRange
in interface GridExtent
public double getCellSize()
getCellSize
in interface GridExtent
public void setCellSize(double cellSize)
setCellSize
in interface GridExtent
cellSize
- cell size in double valuepublic int getNX()
getNX
in interface GridExtent
public int getNY()
getNY
in interface GridExtent
public boolean contains(double x, double y)
contains
in interface GridExtent
public boolean fitsIn(GridExtent extent)
fitsIn
in interface GridExtent
public boolean equals(GridExtent extent)
equals
in interface GridExtent
extent
- extent to comparepublic GridCellImpl getGridCoordsFromWorldCoords(Point2D pt)
layer
- Layer to set the extentpublic Point2D getWorldCoordsFromGridCoords(GridCellImpl cell)
public double getCellSizeX()
getCellSizeX
in interface GridExtent
public void setCellSizeX(double cellSizeX)
setCellSizeX
in interface GridExtent
public double getCellSizeY()
getCellSizeY
in interface GridExtent
public void setCellSizeY(double cellSizeY)
setCellSizeY
in interface GridExtent