public class ExtentImpl extends java.lang.Object implements Extent
Modifier and Type | Class and Description |
---|---|
static interface |
ExtentImpl.Has |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PERSISTENT_DESCRIPTION |
static java.lang.String |
PERSISTENT_NAME |
Constructor and Description |
---|
ExtentImpl()
Constructor sin parámetros
|
ExtentImpl(double x1,
double y1,
double x2,
double y2)
Contructor
|
ExtentImpl(Extent ext)
Constructor de copia
|
ExtentImpl(java.awt.geom.Point2D ul,
java.awt.geom.Point2D lr)
Constructor
|
ExtentImpl(java.awt.geom.Point2D ul,
java.awt.geom.Point2D lr,
java.awt.geom.Point2D ur,
java.awt.geom.Point2D ll)
Constructor
|
ExtentImpl(java.awt.geom.Rectangle2D r)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(Extent ext) |
void |
add(java.awt.geom.Point2D pt)
Verifica un punto, y modifica el extent si no está incluido
|
Extent |
clone() |
Extent |
convert(ICoordTrans trans)
Converts the bounding box to other coordinate reference system
|
Extent |
encloseBoundinBoxes(Extent ext)
Adds the current extent to the selected extent and returns the maximum
bounding box that enclose both.
|
boolean |
equals(java.lang.Object obj)
Compares two extents
|
protected void |
finalize() |
double |
getCenterX()
Obtiene el centro en X del extent
|
double |
getCenterY()
Obtiene el centro en Y del extent
|
GridExtent |
getGridExtent(double cellSize)
Builds a new GridExtent using this extension
|
double |
getLLX()
Obtiene la coordenada X de la esquina inferior izquierda.
|
double |
getLLY()
Obtiene la coordenada Y de la esquina inferior izquierda.
|
java.awt.geom.Point2D |
getLR()
Gets the lower right corner
|
double |
getLRX()
Obtiene la coordenada X de la esquina inferior derecha.
|
double |
getLRY()
Obtiene la coordenada Y de la esquina inferior derecha.
|
java.awt.geom.Point2D |
getMax()
Obtiene el punto máximo
|
java.awt.geom.Point2D |
getMin()
Obtiene el punto mínimo
|
double[] |
getScale(double width,
double height) |
double[] |
getScale(int width,
int height)
Obtiene la escala
|
java.awt.geom.Point2D |
getUL()
Gets the upper left corner
|
double |
getULX()
Obtiene la coordenada X de la esquina superior izquierda.
|
double |
getULY()
Obtiene la coordenada Y de la esquina superior izquierda.
|
double |
getURX()
Obtiene la coordenada X de la esquina superior derecha.
|
double |
getURY()
Obtiene la coordenada Y de la esquina superior derecha.
|
double |
height()
Obtiene el alto
|
Extent |
intersection(Extent ext)
Gets the intersection between two bounding box
|
boolean |
intersects(Extent ext)
Returns true if the selected bounding box intersects with the
current
|
boolean |
isAt(java.awt.geom.Point2D pt) |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
double |
maxX()
Obtiene la coordenada X máxima
|
double |
maxY()
Obtiene la coordenada Y máxima
|
double |
minX()
Obtiene la coordenada X mínima
|
double |
minY()
Obtiene la coordenada Y mínima
|
java.awt.geom.Point2D |
rasterToWorld(java.awt.geom.Point2D pt,
double cellsize)
Given a cell size, converts a point in raster coordinates to world coordinates
|
static void |
registerPersistence() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setLRXToMax()
Asigna la coordenada X de la esquina inferior derecha al máximo X
|
void |
setLRXToMin()
Asigna la coordenada X de la esquina inferior derecha al mínimo X
|
void |
setLRYToMax()
Asigna la coordenada Y de la esquina inferior derecha al máximo Y
|
void |
setLRYToMin()
Asigna la coordenada Y de la esquina inferior derecha al mínimo Y
|
void |
setULXToMax()
Asigna la coordenada X de la esquina superior izquierda al máximo X
|
void |
setULXToMin()
Asigna la coordenada X de la esquina superior izquierda al mínimo X
|
void |
setULYToMax()
Asigna la coordenada Y de la esquina superior izquierda al máximo Y
|
void |
setULYToMin()
Asigna la coordenada Y de la esquina superior izquierda al mínimo Y
|
java.awt.geom.Rectangle2D |
toRectangle2D() |
java.lang.String |
toString() |
double |
width()
Obtiene el ancho
|
java.awt.geom.Point2D |
worldToRaster(java.awt.geom.Point2D pt,
double cellsize)
Given a cell size, converts a point in world coordinates to pixel coordinates
|
public static final java.lang.String PERSISTENT_NAME
public static final java.lang.String PERSISTENT_DESCRIPTION
public ExtentImpl()
public ExtentImpl(java.awt.geom.Point2D ul, java.awt.geom.Point2D lr)
ul
- punto que representa la esquina superior izquierdalr
- punto que representa la esquina inferior derechapublic ExtentImpl(java.awt.geom.Point2D ul, java.awt.geom.Point2D lr, java.awt.geom.Point2D ur, java.awt.geom.Point2D ll)
ul
- punto que representa la esquina superior izquierdalr
- punto que representa la esquina inferior derechaur
- punto que representa la esquina superior derechall
- punto que representa la esquina inferior izquierdapublic ExtentImpl(double x1, double y1, double x2, double y2)
x1
- punto que representa la coordenada X de la esquina superior izquierday1
- punto que representa la coordenada Y de la esquina superior izquierdax2
- punto que representa la coordenada X de la esquina inferior derechay2
- punto que representa la coordenada Y de la esquina inferior derechapublic ExtentImpl(java.awt.geom.Rectangle2D r)
r
- Rectangulo 2Dpublic ExtentImpl(Extent ext)
ext
- Objeto Extentpublic Extent encloseBoundinBoxes(Extent ext)
Extent
encloseBoundinBoxes
in interface Extent
public Extent intersection(Extent ext)
Extent
intersection
in interface Extent
public boolean intersects(Extent ext)
Extent
intersects
in interface Extent
public GridExtent getGridExtent(double cellSize)
Extent
getGridExtent
in interface Extent
public Extent clone()
public double minX()
public double minY()
public double maxX()
public double maxY()
public java.awt.geom.Point2D getMin()
public java.awt.geom.Point2D getMax()
public boolean isAt(java.awt.geom.Point2D pt)
public double width()
Extent
public double height()
Extent
public double getCenterX()
getCenterX
in interface Extent
public double getCenterY()
getCenterY
in interface Extent
public void add(java.awt.geom.Point2D pt)
pt
- public void add(Extent ext)
public double[] getScale(int width, int height)
public double[] getScale(double width, double height)
public java.awt.geom.Rectangle2D toRectangle2D()
toRectangle2D
in interface Extent
public java.lang.String toString()
toString
in class java.lang.Object
public java.awt.geom.Point2D getUL()
Extent
public java.awt.geom.Point2D getLR()
Extent
public double getULX()
public double getULY()
public double getLRX()
public double getLRY()
public double getURX()
public double getURY()
public double getLLX()
public double getLLY()
public void setULXToMin()
setULXToMin
in interface Extent
public void setULXToMax()
setULXToMax
in interface Extent
public void setULYToMin()
setULYToMin
in interface Extent
public void setULYToMax()
setULYToMax
in interface Extent
public void setLRXToMin()
setLRXToMin
in interface Extent
public void setLRXToMax()
setLRXToMax
in interface Extent
public void setLRYToMin()
setLRYToMin
in interface Extent
public void setLRYToMax()
setLRYToMax
in interface Extent
public Extent convert(ICoordTrans trans)
Extent
public boolean equals(java.lang.Object obj)
Extent
public java.awt.geom.Point2D rasterToWorld(java.awt.geom.Point2D pt, double cellsize)
rasterToWorld
in interface Extent
pt
- Point to transformpublic java.awt.geom.Point2D worldToRaster(java.awt.geom.Point2D pt, double cellsize)
worldToRaster
in interface Extent
pt
- Point to transformpublic void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public static void registerPersistence()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable