public class TLcdOWSBoundingBox extends TLcdDataObject implements ILcdBounded
This type is adapted from the EnvelopeType of GML 3.1, with modified contents and documentation for encoding a MINIMUM size box SURROUNDING all associated data.
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
CRS_PROPERTY
Data property that maps to the
crs attribute. |
static TLcdDataProperty |
DIMENSIONS_PROPERTY
Data property that maps to the
dimensions attribute. |
static TLcdDataProperty |
LOWER_CORNER_PROPERTY
Data property that maps to the
LowerCorner element. |
static TLcdDataProperty |
UPPER_CORNER_PROPERTY
Data property that maps to the
UpperCorner element. |
Constructor and Description |
---|
TLcdOWSBoundingBox()
Constructs a new undefined TLcdOWSBoundingBox.
|
TLcdOWSBoundingBox(String aCrs,
TLcdOWSPosition aLowerCorner,
TLcdOWSPosition aUpperCorner)
Convenience constructor that sets the crs, lower corner and upper corner when constructing a
TLcdOWSBoundingBox.
|
TLcdOWSBoundingBox(TLcdDataType aType)
Constructs a new undefined TLcdOWSBoundingBox, with a custom data type
To define these bounds, set the
crs , lower corner
and upper corner values |
Modifier and Type | Method and Description |
---|---|
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
String |
getCrs()
Returns the value of the property that maps to the
crs attribute. |
Integer |
getDimensions()
Returns the value of the property that maps to the
dimensions attribute. |
TLcdOWSPosition |
getLowerCorner()
Returns the value of the property that maps to the
LowerCorner element. |
TLcdOWSPosition |
getUpperCorner()
Returns the value of the property that maps to the
UpperCorner element. |
void |
setCrs(String aValue)
Sets the value of the property that maps to the
crs attribute. |
void |
setDimensions(Integer aValue)
Sets the value of the property that maps to the
dimensions attribute. |
void |
setLowerCorner(TLcdOWSPosition aValue)
Sets the value of the property that maps to the
LowerCorner element. |
void |
setUpperCorner(TLcdOWSPosition aValue)
Sets the value of the property that maps to the
UpperCorner element. |
void |
setValue(String aPropertyName,
Object aValue)
Convenience method that sets the value of the property with the given name.
|
void |
setValue(TLcdDataProperty aProperty,
Object aValue)
Sets the value of the given property for this data object.
|
clone, clone, getDataType, getValue, getValue, hasValue, hasValue, toString
public static final TLcdDataProperty CRS_PROPERTY
crs
attribute.
The possible values for this property are instances of String
.public static final TLcdDataProperty DIMENSIONS_PROPERTY
dimensions
attribute.
The possible values for this property are instances of Integer
.public static final TLcdDataProperty LOWER_CORNER_PROPERTY
LowerCorner
element.
The possible values for this property are instances of TLcdOWSPosition
.public static final TLcdDataProperty UPPER_CORNER_PROPERTY
UpperCorner
element.
The possible values for this property are instances of TLcdOWSPosition
.public TLcdOWSBoundingBox()
crs
, lower corner
and upper corner
valuespublic TLcdOWSBoundingBox(TLcdDataType aType)
crs
, lower corner
and upper corner
valuesaType
- The datatype to usepublic TLcdOWSBoundingBox(String aCrs, TLcdOWSPosition aLowerCorner, TLcdOWSPosition aUpperCorner)
aCrs
- The crs to setaLowerCorner
- The lower corner to setaUpperCorner
- The upper corner to setpublic void setValue(TLcdDataProperty aProperty, Object aValue)
ILcdDataObject
Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.
The given property must be declared in thedata object's type
or in one of its super types. In
other words, getDataType().getProperties().contains( aProperty ) should always be true.
Otherwise, the implementation should throw an IllegalArgumentException
.setValue
in interface ILcdDataObject
setValue
in class TLcdDataObject
aProperty
- the property for which the value is to be setaValue
- the value to setTLcdDataType.getProperty(String)
public void setCrs(String aValue)
crs
attribute.
Usually references the definition of a CRS, as specified in [OGC Topic 2]. Such a CRS definition can be XML encoded using the gml:CoordinateReferenceSystemType in [GML 3.1]. For well known references, it is not required that a CRS definition exist at the location the URI points to. If no anyURI value is included, the applicable CRS must be either: a) Specified outside the bounding box, but inside a data structure that includes this bounding box, as specified for a specific OWS use of this bounding box type. b) Fixed and specified in the Implementation Specification for a specific OWS use of the bounding box type.
aValue
- the value to set for the CRS_PROPERTY
property.public void setDimensions(Integer aValue)
dimensions
attribute.
The number of dimensions in this CRS (the length of a coordinate sequence in this use of the PositionType). This number is specified by the CRS definition, but can also be specified here.
aValue
- the value to set for the DIMENSIONS_PROPERTY
property.public void setValue(String aPropertyName, Object aValue)
ILcdDataObject
Convenience method that sets the value of the property with the given name.
If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy). SeeILcdDataObject.setValue(TLcdDataProperty, Object)
for more information.setValue
in interface ILcdDataObject
setValue
in class TLcdDataObject
aPropertyName
- the name of the property of which the value is to be setaValue
- the value to setpublic void setLowerCorner(TLcdOWSPosition aValue)
LowerCorner
element.
Position of the bounding box corner at which the value of each coordinate normally is the algebraic minimum within this bounding box. In some cases, this position is normally displayed at the top, such as the top left for some image coordinates. For more information, see Subclauses 10.2.5 and C.13.
aValue
- the value to set for the LOWER_CORNER_PROPERTY
property.public void setUpperCorner(TLcdOWSPosition aValue)
UpperCorner
element.
Position of the bounding box corner at which the value of each coordinate normally is the algebraic maximum within this bounding box. In some cases, this position is normally displayed at the bottom, such as the bottom right for some image coordinates. For more information, see Subclauses 10.2.5 and C.13.
aValue
- the value to set for the UPPER_CORNER_PROPERTY
property.public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.
If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points)
the return value is unspecified.
It is highly recommended to return an undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public String getCrs()
crs
attribute.
Usually references the definition of a CRS, as specified in [OGC Topic 2]. Such a CRS definition can be XML encoded using the gml:CoordinateReferenceSystemType in [GML 3.1]. For well known references, it is not required that a CRS definition exist at the location the URI points to. If no anyURI value is included, the applicable CRS must be either: a) Specified outside the bounding box, but inside a data structure that includes this bounding box, as specified for a specific OWS use of this bounding box type. b) Fixed and specified in the Implementation Specification for a specific OWS use of the bounding box type.
CRS_PROPERTY
property.public Integer getDimensions()
dimensions
attribute.
The number of dimensions in this CRS (the length of a coordinate sequence in this use of the PositionType). This number is specified by the CRS definition, but can also be specified here.
DIMENSIONS_PROPERTY
property.public TLcdOWSPosition getLowerCorner()
LowerCorner
element.
Position of the bounding box corner at which the value of each coordinate normally is the algebraic minimum within this bounding box. In some cases, this position is normally displayed at the top, such as the top left for some image coordinates. For more information, see Subclauses 10.2.5 and C.13.
LOWER_CORNER_PROPERTY
property.public TLcdOWSPosition getUpperCorner()
UpperCorner
element.
Position of the bounding box corner at which the value of each coordinate normally is the algebraic maximum within this bounding box. In some cases, this position is normally displayed at the bottom, such as the bottom right for some image coordinates. For more information, see Subclauses 10.2.5 and C.13.
UPPER_CORNER_PROPERTY
property.