public class BoundingBox extends Object implements IBoundingBox, IRangeValueDomain<IBoundingBox>
BoundingBox2D
,
BoundingBox3D
Modifier and Type | Field and Description |
---|---|
protected String |
crs |
protected int |
dimensions |
static String |
ERROR_INPUT_COORDINATES |
static String |
ERROR_NUM_OF_COORINDATE_DIFFER |
protected double[] |
lowerCorner
stores the coordinates of the lowerCorner.
|
protected double[] |
upperCorner
stores the coordinates of the upperCorner.
|
Constructor and Description |
---|
BoundingBox(double[] lowerLeft,
double[] upperRight)
this constructor has all required attributes as its parameters.
|
BoundingBox(String crs,
double[] lowerLeft,
double[] upperRight)
this constructor has all attributes as its parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsValue(IBoundingBox bBox)
checks if the parameter bBox is contained in (or equal to) this BoundingBox.
|
boolean |
equals(Object obj) |
String |
getCRS() |
double |
getDepth()
difference in z direction, i.e.
|
int |
getDimensions() |
String |
getDomainDescription() |
double |
getHeight()
difference in y direction, i.e.
|
double[] |
getLowerCorner() |
double[] |
getMaxValue() |
double[] |
getMinValue() |
double[] |
getUpperCorner() |
double |
getWidth()
difference in x direction, i.e.
|
int |
hashCode() |
BoundingBox |
produceValue(String... stringArray) |
protected void |
setCRS(String crs) |
protected void |
setDimensions(int dimensions) |
protected void |
setLowerCorner(double[] lowerCornerArray) |
protected void |
setUpperCorner(double[] upperCornerArray) |
String |
toKVPString() |
String |
toString() |
String |
toXML() |
public static final String ERROR_INPUT_COORDINATES
public static final String ERROR_NUM_OF_COORINDATE_DIFFER
protected double[] lowerCorner
protected double[] upperCorner
protected String crs
protected int dimensions
public BoundingBox(double[] lowerLeft, double[] upperRight)
lowerLeft
- the lowerCornerupperRight
- the upperCornerNullPointerException
- if one of the arguments are null
IllegalStateException
- if passed argument arrays have different length/dimension.public BoundingBox(String crs, double[] lowerLeft, double[] upperRight)
crs
- a EPSG String for instancelowerLeft
- the lowerCornerupperRight
- the upperCornerNullPointerException
- if one of the arguments are null
IllegalStateException
- if passed argument arrays have different length/dimension.public String getCRS()
getCRS
in interface IBoundingBox
protected void setCRS(String crs)
crs
- The cRS to set.public double[] getMaxValue()
getMaxValue
in interface IRangeValueDomain<IBoundingBox>
Object
can be replaced by a specialized type.
(e.g. BoundingBox: public double[] getMaxValue()
)public double[] getMinValue()
getMinValue
in interface IRangeValueDomain<IBoundingBox>
Object
can be replaced by a specialized type.
(e.g. BoundingBox: public double[] getMinValue()
)public double[] getLowerCorner()
getLowerCorner
in interface IBoundingBox
protected void setLowerCorner(double[] lowerCornerArray)
lowerCornerArray
- The lowerCorner to set.IllegalArgumentException
- if the length of the coordinate tupel is not equal to the dimension count. This only
happens, if the dimension number is set!public double[] getUpperCorner()
getUpperCorner
in interface IBoundingBox
protected void setUpperCorner(double[] upperCornerArray)
upperCornerArray
- The upperCorner to set.IllegalArgumentException
- if the length of the coordinate tupel is not equal to the dimension count. This only
happens, if the dimension number is set!public int getDimensions()
getDimensions
in interface IBoundingBox
protected void setDimensions(int dimensions)
public boolean containsValue(IBoundingBox bBox)
containsValue
in interface IValueDomain<IBoundingBox>
bBox
- the IBoundingBox to checktrue
,if the value t is part of this value domain.public String toXML()
toXML
in interface IValueDomain<IBoundingBox>
public String toKVPString()
public String getDomainDescription()
getDomainDescription
in interface IValueDomain<IBoundingBox>
public BoundingBox produceValue(String... stringArray)
produceValue
in interface IValueDomain<IBoundingBox>
public double getWidth()
public double getHeight()
public double getDepth()
Copyright © 2012–2017 52North Initiative for Geospatial Open Source Software GmbH. All rights reserved.