public class VerticalDatumContainer
extends java.lang.Object
implements hec.data.IVerticalDatum, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
currentDatum |
double |
elevation |
java.lang.String |
localDatumName |
java.lang.String |
nativeDatum |
double |
navd88Offset |
boolean |
navd88OffsetIsEstimate |
double |
ngvd29Offset |
boolean |
ngvd29OffsetIsEstimate |
java.lang.String |
unit |
| Constructor and Description |
|---|
VerticalDatumContainer()
Public constructor
|
VerticalDatumContainer(java.lang.String initStr)
Public constructor
|
| Modifier and Type | Method and Description |
|---|---|
VerticalDatumContainer |
clone()
Returns a copy of this object
|
void |
clone(VerticalDatumContainer other)
Copies this object into another
|
boolean |
equals(java.lang.Object other)
Returns whether another object is equal to this one
|
boolean |
forceVerticalDatum(java.lang.String datum)
Sets the objects current vertical datum to the specified vertical datum without changing any elevations.
|
double |
getCurrentOffset()
Retrieves the offset added to the an elevation in the native vertical datum to generate an elevation in the current datum in the current unit
|
double |
getCurrentOffset(java.lang.String unit)
Retrieves the offset added to the an elevation in the native vertical datum to generate an elevation in the current datum
|
java.lang.String |
getCurrentVerticalDatum()
Retrieves the current vertical datum of the object's elevation(s)
|
java.lang.String |
getNativeVerticalDatum()
Retrieves the native vertical datum of the object's elevation(s)
|
double |
getNAVD88Offset()
Retrieves the offset added to the an elevation in the native vertical datum to generate an elevation in NAVD88 in the current unit
|
double |
getNAVD88Offset(java.lang.String unit)
Retrieves the offset added to the an elevation in the native vertical datum to generate an elevation in NAVD88
|
double |
getNGVD29Offset()
Retrieves the offset added to the an elevation in the native vertical datum to generate an elevation in NGVD29 in the current unit
|
double |
getNGVD29Offset(java.lang.String unit)
Retrieves the offset added to the an elevation in the native vertical datum to generate an elevation in NGVD29
|
VerticalDatumContainer |
getVerticalDatumContainer()
Returns this VerticalDatumContainer object.
|
java.lang.String |
getVerticalDatumInfo()
Retrieves a text representation of the vertical datum information
|
int |
hashCode() |
boolean |
isCurrentVerticalDatumEstimated()
Retrieves whether the elevation(s) in the current vertical datum were generated by an estimated offset
|
boolean |
isNAVD88OffsetEstimated()
Retrieves whether the offset added to the an elevation in the native vertical datum to generate an elevation in NAVD88 is an estimate
|
boolean |
isNGVD29OffsetEstimated()
Retrieves whether the offset added to the an elevation in the native vertical datum to generate an elevation in NGVD29 is an estimate
|
void |
printToConsole()
prints contents to System.out
|
void |
setVerticalDatumContainer(VerticalDatumContainer vdc)
Sets all the member variables to the given VerticalDatumContainer member values.
|
void |
setVerticalDatumInfo(java.lang.String initStr)
Initializes the object from a string initializer
|
boolean |
toNativeVerticalDatum()
Changes the object's elevation(s) (if necessary) to its native vertical datum
|
boolean |
toNAVD88()
Changes the object's elevation(s) (if necessary) to NAVD88
|
boolean |
toNGVD29()
Changes the object's elevation(s) (if necessary) to NGVD29
|
java.lang.String |
toString()
Returns an XML string describing the object.
|
boolean |
toVerticalDatum(java.lang.String datum)
Changes the object's elevation(s) (if necessary) to the specified vertical datum
|
java.lang.String |
toXml()
Returns an XML string describing the object.
|
java.lang.String |
toXml(java.lang.CharSequence indent,
int level)
Returns an XML string describing the object.
|
public java.lang.String nativeDatum
public java.lang.String currentDatum
public java.lang.String localDatumName
public java.lang.String unit
public double elevation
public double ngvd29Offset
public double navd88Offset
public boolean ngvd29OffsetIsEstimate
public boolean navd88OffsetIsEstimate
public VerticalDatumContainer()
public VerticalDatumContainer(java.lang.String initStr)
throws hec.data.VerticalDatumException
initStr - String initializer. May be either an XML fragment of the following format or
simply the name of the native vertical datum (in which case no datum conversion
is supported).
<vertical-datum-info "unit"="ft">
<native-datum>OTHER</native-datum>
<local-datum-name>Pensacola</local-datum-name>
<elevation>1407.22</elevation>
<offset "estimate"="true">
<to-datum>NAVD-88</to-datum>
<value>1.457</value>
</offset>
<offset "estimate"="false">
<to-datum>NGVD-29</to-datum>
<value>1.07</value>
</offset>
</vertical-datum-info>
The <native-datum> element must be one of:
All <offset> elements specify the value to add to an
elevation in the native datum to get an elevation in the datum specified <to-datum>
datum (in the unit specified in the <vertical-datum-info> element.
The <to-datum> values are limited to NGVD-29 and NAVD-88. No offset
is required to be specified for the native datum.
hec.data.VerticalDatumExceptionpublic java.lang.String getNativeVerticalDatum()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetNativeVerticalDatum in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the native vertical datum is not setpublic java.lang.String getCurrentVerticalDatum()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetCurrentVerticalDatum in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the current vertical datum is not setpublic boolean isCurrentVerticalDatumEstimated()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumisCurrentVerticalDatumEstimated in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the current vertical datum is not setpublic boolean toNativeVerticalDatum()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumtoNativeVerticalDatum in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the native vertical datum is not setpublic boolean toNGVD29()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumtoNGVD29 in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain enough information to perform the operationpublic boolean toNAVD88()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumtoNAVD88 in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain enough information to perform the operationpublic boolean toVerticalDatum(java.lang.String datum)
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumtoVerticalDatum in interface hec.data.IVerticalDatumdatum - the vertical datum to change to: hec.data.VerticalDatumException - if the object doesn't contain enough information to perform the operationpublic boolean forceVerticalDatum(java.lang.String datum)
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumforceVerticalDatum in interface hec.data.IVerticalDatumdatum - the vertical datum to change to: hec.data.VerticalDatumException - if the object doesn't contain enough information to perform the operationpublic double getCurrentOffset()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetCurrentOffset in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic double getCurrentOffset(java.lang.String unit)
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetCurrentOffset in interface hec.data.IVerticalDatumunit - the unit to retrieve the offset inhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic double getNGVD29Offset()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetNGVD29Offset in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic double getNGVD29Offset(java.lang.String unit)
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetNGVD29Offset in interface hec.data.IVerticalDatumunit - the unit to retrieve the offset inhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic double getNAVD88Offset()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetNAVD88Offset in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic double getNAVD88Offset(java.lang.String unit)
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumgetNAVD88Offset in interface hec.data.IVerticalDatumunit - the unit to retrieve the offset inhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic boolean isNGVD29OffsetEstimated()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumisNGVD29OffsetEstimated in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic boolean isNAVD88OffsetEstimated()
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumisNAVD88OffsetEstimated in interface hec.data.IVerticalDatumhec.data.VerticalDatumException - if the object doesn't contain the required offset informationpublic java.lang.String getVerticalDatumInfo()
hec.data.IVerticalDatumgetVerticalDatumInfo in interface hec.data.IVerticalDatumpublic void setVerticalDatumInfo(java.lang.String initStr)
throws hec.data.VerticalDatumException
hec.data.IVerticalDatumsetVerticalDatumInfo in interface hec.data.IVerticalDatuminitStr - String initializer. May be either an XML fragment of the following format or
simply the name of the native vertical datum (in which case no datum conversion
is supported).
<vertical-datum-info "unit"="ft">
<native-datum>OTHER</native-datum>
<local-datum-name>Pensacola</local-datum-name>
<elevation>1407.22</elevation>
<offset "estimate"="true">
<to-datum>NAVD-88</to-datum>
<value>1.457</value>
</offset>
<offset "estimate"="false">
<to-datum>NGVD-29</to-datum>
<value>1.07</value>
</offset>
</vertical-datum-info>
The <native-datum> element must be one of:
All <offset> elements specify the value to add to an
elevation in the native datum to get an elevation in the datum specified <to-datum>
datum (in the unit specified in the <vertical-datum-info> element.
The <to-datum> values are limited to NGVD-29 and NAVD-88. No offset
is required to be specified for the native datum.
hec.data.VerticalDatumExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toXml()
public java.lang.String toXml(java.lang.CharSequence indent,
int level)
indent - the text to use for indenting sub-elementslevel - the outer level of indentationpublic VerticalDatumContainer clone()
clone in class java.lang.Objectpublic void clone(VerticalDatumContainer other)
other - the VerticalDatumContainer to copy intopublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic VerticalDatumContainer getVerticalDatumContainer()
getVerticalDatumContainer in interface hec.data.IVerticalDatumpublic void setVerticalDatumContainer(VerticalDatumContainer vdc)
setVerticalDatumContainer in interface hec.data.IVerticalDatumvdc - public void printToConsole()