|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gbif.datatester.AbstractDataTest
org.gbif.datatester.AbstractRecordTest
org.gbif.datatester.tests.ElevationErrorTest
public class ElevationErrorTest
Generic elevation error test. Given a point (latitude and longitude in decimal degrees with WGS84 datum), an uncertainty value for the point (in meters), and an elevation range from the original record, the test gets the associated elevation from a digital elevation map (DEM) and compares with the original elevation. It's actually a range comparison, because the point uncertainty value determines an area with a minimum and maximum elevation taken from the DEM. If the original range doesn't fully contain the range as provided by the DEM, then this test assigns an error tag.
Records that only have a single field for elevation should populate both min and max
original values with the same value. Interaction with the DEM should be performed by an
external class that implements the ExternalGeospatialRasterReader interface.
The test accepts seven parameters: longitudeConcept, latitudeConcept,
uncertaintyConcept, minimumElevationConcept, maximumElevationConcept,
rasterDataReader and rasterAttributeId. The first five parameters must contain
the identifier of known Concepts with a "double" DataType.
uncertaintyConcept is optional. When not provided, 10 meters will be used for
uncertainty values. rasterDataReader must contain a class name (including java package)
of an external class implementing the ExternalGeospatialRasterReader interface.
rasterAttributeId must specify an attribute identifier (some value associated with
a raster file, or the raster file name itself) that is necessary to interact with the
external lookup class.
A typical configuration entry for this test would look like:
<test id="10" class="org.gbif.datatester.tests.ElevationErrorTest">
<parameter name="longitudeConcept">
<value v="Longitude" />
</parameter>
<parameter name="latitudeConcept">
<value v="Latitude" />
</parameter>
<parameter name="uncertaintyConcept">
<value v="Uncertainty" />
</parameter>
<parameter name="minimumElevationConcept">
<value v="MinElevation" />
</parameter>
<parameter name="maximumElevationConcept">
<value v="MaxElevation" />
</parameter>
<parameter name="rasterDataReader">
<value v="myClassThatCanReadGridFiles" />
</parameter>
<parameter name="rasterAttributeId">
<value v="Elevation" />
</parameter>
</test>
| Field Summary | |
|---|---|
static java.lang.String |
CALCULATED_ELEVATION_TAG_ID
Shortcut to the "calculated elevation" tag. |
static java.lang.String |
CALCULATED_MAXIMUM_ELEVATION_TAG_ID
Shortcut to the "calculated maximum elevation" tag. |
static java.lang.String |
CALCULATED_MINIMUM_ELEVATION_TAG_ID
Shortcut to the "calculated minimum elevation" tag. |
static java.lang.String |
ELEVATION_ERROR_TAG_ID
Shortcut to the "elevation error" tag. |
static java.lang.String |
NO_DATA_TAG_ID
Shortcut to the "no data" tag. |
| Fields inherited from class org.gbif.datatester.AbstractDataTest |
|---|
instanceId, knownConcepts, locale, result |
| Constructor Summary | |
|---|---|
ElevationErrorTest()
Contructs a generic elevation error test. |
|
| Method Summary | |
|---|---|
protected void |
doInitialize()
Internal method to initialize the test. |
protected boolean |
doTest(GenericRecord genericRecord)
Detect inconsistencies in elevation versus related coordinates. |
java.lang.String |
getVersion()
Outputs the current version of this test based on the CVS revision. |
| Methods inherited from class org.gbif.datatester.AbstractRecordTest |
|---|
doTest, minNumberOfRecords, test |
| Methods inherited from class org.gbif.datatester.AbstractDataTest |
|---|
declareMandatoryConcept, declareOptionalConcept, declareParameter, declareTag, getDescription, getInstanceId, getInstanceXml, getMandatoryConcepts, getOptionalConcepts, getParametersMetadata, getParameterValue, getPossibleTags, getResourceBundle, getResult, getString, initialize, initialize, loadResourceBundle, setLocale, setResourceBundleBaseName, test |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ELEVATION_ERROR_TAG_ID
Shortcut to the "elevation error" tag.
public static final java.lang.String CALCULATED_ELEVATION_TAG_ID
Shortcut to the "calculated elevation" tag.
public static final java.lang.String CALCULATED_MAXIMUM_ELEVATION_TAG_ID
Shortcut to the "calculated maximum elevation" tag.
public static final java.lang.String CALCULATED_MINIMUM_ELEVATION_TAG_ID
Shortcut to the "calculated minimum elevation" tag.
public static final java.lang.String NO_DATA_TAG_ID
Shortcut to the "no data" tag.
| Constructor Detail |
|---|
public ElevationErrorTest()
Contructs a generic elevation error test.
| Method Detail |
|---|
protected void doInitialize()
throws DataTesterException
Internal method to initialize the test.
doInitialize in class AbstractDataTestDataTesterException
protected boolean doTest(GenericRecord genericRecord)
throws DataTesterException
Detect inconsistencies in elevation versus related coordinates.
doTest in class AbstractDataTestgenericRecord - Record to be tested.
DataTesterExceptionpublic java.lang.String getVersion()
Outputs the current version of this test based on the CVS revision.
getVersion in interface DataTestgetVersion in class AbstractDataTest
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||