Package org.vast.util
Class SpatialExtent
java.lang.Object
org.vast.util.SpatialExtent
- Direct Known Subclasses:
Bbox
Class for storing the definition of a spatial domain. This mainly includes enveloppe coordinates and a crs.
- Since:
- Nov 15, 2005
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(SpatialExtent bbox) Combines given extent with this extent by computing the smallest rectangular extent that contains both of them.protected void
checkCrs
(SpatialExtent bbox) Checks if extents crs are compatibleboolean
contains
(SpatialExtent bbox) Finds out if given extent is included in this one.copy()
boolean
double[]
getCrs()
double
double
double
getMaxX()
double
getMaxY()
double
getMaxZ()
double
getMinX()
double
getMinY()
double
getMinZ()
double
getSizeX()
double
getSizeY()
double
getSizeZ()
int
hashCode()
boolean
intersects
(SpatialExtent bbox) Finds out if this bbox intersects the given bbox.boolean
isNull()
protected boolean
isNull
(boolean testZ) void
nullify()
void
resizeToContain
(double x, double y, double z) Resize spatial extent so that it contains the given 3D point Point x,y,z coordinates must be in same Crs as SpatialExtentvoid
void
setMaxX
(double maxX) void
setMaxY
(double maxY) void
setMaxZ
(double maxZ) void
setMinX
(double minX) void
setMinY
(double minY) void
setMinZ
(double minZ) toString()
-
Field Details
-
crs
-
minX
protected double minX -
maxX
protected double maxX -
minY
protected double minY -
maxY
protected double maxY -
minZ
protected double minZ -
maxZ
protected double maxZ
-
-
Constructor Details
-
SpatialExtent
public SpatialExtent()
-
-
Method Details
-
copy
- Returns:
- an exact copy of this SpatialExtent
-
getCenter
public double[] getCenter() -
getDiagonalDistance
public double getDiagonalDistance() -
getMaxDistance
public double getMaxDistance() -
getSizeX
public double getSizeX() -
getSizeY
public double getSizeY() -
getSizeZ
public double getSizeZ() -
isNull
public boolean isNull() -
isNull
protected boolean isNull(boolean testZ) -
nullify
public void nullify() -
resizeToContain
public void resizeToContain(double x, double y, double z) Resize spatial extent so that it contains the given 3D point Point x,y,z coordinates must be in same Crs as SpatialExtent- Parameters:
x
-y
-z
-
-
add
Combines given extent with this extent by computing the smallest rectangular extent that contains both of them.- Parameters:
bbox
-
-
intersects
Finds out if this bbox intersects the given bbox.- Parameters:
bbox
-- Returns:
- true if both bbox intersect
-
contains
Finds out if given extent is included in this one. Returns true if extent is completely contained within this extent- Parameters:
bbox
-- Returns:
- true if given bbox is contained in this bbox
-
checkCrs
Checks if extents crs are compatible- Parameters:
bbox
-
-
equals
-
hashCode
public int hashCode() -
getCrs
-
setCrs
-
getMaxX
public double getMaxX() -
setMaxX
public void setMaxX(double maxX) -
getMaxY
public double getMaxY() -
setMaxY
public void setMaxY(double maxY) -
getMaxZ
public double getMaxZ() -
setMaxZ
public void setMaxZ(double maxZ) -
getMinX
public double getMinX() -
setMinX
public void setMinX(double minX) -
getMinY
public double getMinY() -
setMinY
public void setMinY(double minY) -
getMinZ
public double getMinZ() -
setMinZ
public void setMinZ(double minZ) -
toString
-