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 TypeMethodDescriptionvoidadd(SpatialExtent bbox) Combines given extent with this extent by computing the smallest rectangular extent that contains both of them.protected voidcheckCrs(SpatialExtent bbox) Checks if extents crs are compatiblebooleancontains(SpatialExtent bbox) Finds out if given extent is included in this one.copy()booleandouble[]getCrs()doubledoubledoublegetMaxX()doublegetMaxY()doublegetMaxZ()doublegetMinX()doublegetMinY()doublegetMinZ()doublegetSizeX()doublegetSizeY()doublegetSizeZ()inthashCode()booleanintersects(SpatialExtent bbox) Finds out if this bbox intersects the given bbox.booleanisNull()protected booleanisNull(boolean testZ) voidnullify()voidresizeToContain(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 SpatialExtentvoidvoidsetMaxX(double maxX) voidsetMaxY(double maxY) voidsetMaxZ(double maxZ) voidsetMinX(double minX) voidsetMinY(double minY) voidsetMinZ(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
-