public class TinContainer extends DataContainer implements java.lang.Cloneable, java.io.Serializable
TinContainer class holds data and basic metadata for a
TIN (triangulated irregular network) as 2D vertices (pairs of
longitude/latitude or easting/northing coordinates) and the values
reported at those vertices. Each vertex also has a label, which may
be empty.
To retrieve X, Y, and value for vertex n from TinContainer tc:
X = tc.xCoords[n];
Y = tc.yCoords[n];
value = tc.value[n];
Each vertex has list of the other vertices it connects to via a
triangle edge. This is represented as an int array. No
other topological data is kept in this class. A vertex can be present
in the TIN data set, but disabled, i.e. not a part of any triangles.
In this case the vertex's connection array has only one member, with
a value of -1.
An object of this class does not know where its data came from (or is going). It does not contain any reference or connection to any database or file, but is used as an intermediate data structure for moving data to or from a database or for plot and tabulate functions.
DataContainer.VERTICAL_DATUM, DataContainer.VERTICAL_UNITS| Modifier and Type | Field and Description |
|---|---|
int[][] |
connection
Array of vertex indices that this vertex connects to via triangle edges in this TIN.
|
static int |
DCP_VERTEX
TIN vertex type is "DCP"
|
static int |
GRID_CELL_VERTEX
TIN vertex type is GRID_CELL_VERTEX
|
java.lang.String[] |
label
Array of vertex labels
|
double |
maxValue
Maximum value of data at the vertices, not including nulls or disabled points
|
double |
maxXCoordinate |
double |
maxYCoordinate |
double |
meanValue
Mean value of data at the vertices, not including nulls or disabled points
|
double |
minValue
Minimum value of data at the vertices, not including nulls or disabled points
|
double |
minXCoordinate
The TIN bounds are expressed as {min X, min Y, max X, max Y}.
|
double |
minYCoordinate |
int |
numberPoints
Number of vertices (including inactive ones) present in this TIN
|
static int |
OBSERVER_GAGE_VERTEX
TIN vertex type is OBSERVER_GAGE_VERTEX
|
int[] |
pointType
Array of vertex types as enumerated values.
|
double |
slendernessRatio
Used to weed out "skinny" triangles from TIN
|
java.lang.String |
SpatialReferenceSystem
Gives a complete definition of the coordinate system for the TIN
|
java.lang.String |
SRSName
Short name or label for coordinate system
|
int |
SRSType
Enumerated value indicating the type of string used to define the
coordinate system.
|
java.lang.String |
SRSUnits
Units for coordinate system
|
java.lang.String |
timeZoneName
Label for time zone applied to data values
|
java.lang.String |
type
Data type for values represented by TIN surface, e.g.
|
java.lang.String |
units
Units for values represented by TIN surface, e.g.
|
static int |
UNKNOWN_SRS_DEFINITION_TYPE
SRS string type is unknown
|
double[] |
value
Array of values at vertices.
|
static int |
WKT_ESRI_SRS_DEFINITION_TYPE
SRS string type is ESRI variant of "Well Known Text"
|
static int |
WKT_OGC_SRS_DEFINITION_TYPE
SRS string type is OGC-type "Well Known Text"
|
double[] |
xCoordinate
Array of X coordinates.
|
double[] |
yCoordinate
Array of Y coordinates.
|
coordinateID, coordinateSystem, dataType, fileLastWriteTimeMillis, fileName, fullName, horizontalDatum, horizontalUnits, lastWriteTimeMillis, location, locationTimezone, modified, otherInfo, storedAsdoubles, subVersion, supplementalInfo, version, VERTICAL_DATUM_INFO_HEADER, VERTICAL_DATUM_INFO_KEY, verticalDatum, verticalUnits, watershed, xOrdinate, yOrdinate, zOrdinate| Constructor and Description |
|---|
TinContainer() |
TinContainer(double[] xs,
double[] ys,
double[] vs) |
| Modifier and Type | Method and Description |
|---|---|
void |
clone(TinContainer tc) |
double[] |
getBounds()
Forces
updateStatistics action if minXCoordinate (or any of the
other bounding coordinates) is equal to UNDEFINED_FLOAT. |
double |
getMaxValue()
Forces
updateStatistics action if statistics are undefined. |
double |
getMeanValue()
Forces
updateStatistics action if statistics are undefined. |
double |
getMinValue()
Forces
updateStatistics action if statistics are undefined. |
boolean |
getTimeWindow(HecTime startTime,
HecTime endTime)
Gets the time window for the data, from the
fullname attribute
inherited from dataContainer. |
java.lang.String |
toString() |
void |
updateStatistics()
Computes
minValue, meanValue, maxValue and the bounds (minXCoordinate etc.)
of the TIN. |
clone, extractVerticalDatum, getFullName, getHorizontalDatum, getLatLong, getName, getStoreAsDoubles, getSupplementalInfo, getVerticalDatum, getVerticalUnits, insertVerticalDatum, setFullName, setHorizontalDatum, setLatLong, setName, setStoreAsDoubles, setSupplementalInfo, setVerticalDatum, setVerticalDatum, setVerticalUnits, setVerticalUnitspublic java.lang.String SpatialReferenceSystem
public int SRSType
public static final int UNKNOWN_SRS_DEFINITION_TYPE
public static final int WKT_ESRI_SRS_DEFINITION_TYPE
public static final int WKT_OGC_SRS_DEFINITION_TYPE
public java.lang.String SRSName
public java.lang.String SRSUnits
public java.lang.String units
public java.lang.String type
public java.lang.String timeZoneName
public int numberPoints
public double slendernessRatio
public double[] xCoordinate
xCoordinate[n]public double[] yCoordinate
yCoordinate[n]public double[] value
xCoordinate[n]public int[] pointType
public static final int DCP_VERTEX
public static final int OBSERVER_GAGE_VERTEX
public static final int GRID_CELL_VERTEX
public int[][] connection
connection[0] = {1, 2};
connection[1] = {0, 2};
connection[2] = {0, 1};
Array length of 1 (value = -1) for disabled vertices; i.e. if vertex n is disabled,
connection[n] = {-1};
public java.lang.String[] label
public double minXCoordinate
public double minYCoordinate
public double maxXCoordinate
public double maxYCoordinate
public double minValue
public double maxValue
public double meanValue
public TinContainer()
public TinContainer(double[] xs,
double[] ys,
double[] vs)
public void clone(TinContainer tc)
public double[] getBounds()
updateStatistics action if minXCoordinate (or any of the
other bounding coordinates) is equal to UNDEFINED_FLOAT.double[]
{minimum X, minimum Y, maximum X, maximum Y}public boolean getTimeWindow(HecTime startTime, HecTime endTime)
fullname attribute
inherited from dataContainer.
Returns true if instantaneous, false if period value or undefined
(check startTime to see if undefined)startTime - -- an HecTime object to be set to the TIN's start timeendTime - -- an HecTime object to be set to the TIN's end timeINST- type and the start time is defined
False if the TIN is a PER- type or if the start time is undefinedpublic double getMaxValue()
updateStatistics action if statistics are undefined.maxVauepublic double getMinValue()
updateStatistics action if statistics are undefined.minVauepublic double getMeanValue()
updateStatistics action if statistics are undefined.meanVauepublic void updateStatistics()
minValue, meanValue, maxValue and the bounds (minXCoordinate etc.)
of the TIN.
Locations of disabled points are included in the computation of the TIN bounds, but the values at disabled points are not included in min, mean, max computations.
public java.lang.String toString()
toString in class DataContainer