|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IElementSet
Data exchange between components in OpenMI is always related to one or more elements in a space, either geo-referenced or not. An element set in OpenMI can be anything from a one-dimensional array of points, line segments, poly lines or polygons, through to an array of three-dimensional volumes. As a special case, a cloud of IDBased elements (without co-ordinates) is also supported thus allowing exchange of arbitrary data that is not related to space in any way.
The IElementSet interface has been defined to describe, in a finite element sense, the space where the values apply, while preserving a course granularity level of the interface. Conceptually, IElementSet is composed of an ordered list of elements having a common type. The geometry of each element can be described by an ordered list of vertices. The shape of three-dimensional elements (i.e. volumes or polyhedrons) can be queried by face. If the element set is geo-referenced (i.e. the SpatialReference is not Null), co-ordinates (X,Y,Z) can be obtained for each vertex of an element. The ElementType is an enumeration, listed in Table 1. Data not related to spatial representation can be described by composing an element set containing one (or more) IDBased elements, without any geo-reference. Note that IElementSet can be used to query the geometric description of a model schematization, but an implementation does not necessarily provide all topological knowledge on inter-element connections. The interface of a spatial reference (ISpatialReference) only contains a String ID. No other properties and methods have been defined, as the OpenGIS SpatialReferenceSystem specification (OGC 2002) provides an excellent standard for this purpose. The element set and the element are identified by a String ID. The ID is intended to be useful in terms of an end user. This is particularly useful for configuration as well as for providing specific logging information. However, the properties of an element (its vertices and/or faces) are obtained using an integer index (elementIndex, faceIndex and vertexIndex). This functionality is introduced because an element set is basically an ordered list of elements, an element may have faces and an element (or a face) is an ordered list of vertices. The integer index indicates the location of the element/vertex in the array list. While most models encapsulate static element sets, some advanced models might contain dynamic elements (e.g. waves). A version number has been introduced to enable tracking of changes over time. If the version changes, the element set might need to be queried again during the computation process.
Nested Class Summary | |
---|---|
static class |
IElementSet.ElementType
Shape Type of an Elementset. |
Method Summary | |
---|---|
java.lang.String |
getDescription()
Additional descriptive information |
int |
getElementCount()
Number of elements in the ElementSet |
java.lang.String |
getElementID(int elementIndex)
Returns ID of 'ElementIndex'-th element in the ElementSet. |
int |
getElementIndex(java.lang.String elementID)
Index of element 'ElementID' in the elementset. |
IElementSet.ElementType |
getElementType()
ElementType of the elementset. |
int |
getFaceCount(int elementIndex)
Returns the number of faces in an element. |
int[] |
getFaceVertexIndices(int elementIndex,
int faceIndex)
Gives an array with the vertex indices for a face. |
java.lang.String |
getID()
Identification String EXAMPLE: "River Branch 34", "Node 34" |
ISpatialReference |
getSpatialReference()
The SpatialReference defines the spatial reference to be used in association with the coordinates in the ElementSet. |
int |
getVersion()
The current version number for the populated ElementSet. |
int |
getVertexCount(int elementIndex)
Number of vertices for the element specified by the elementIndex. |
double |
getXCoordinate(int elementIndex,
int vertexIndex)
X-coord for the vertex with VertexIndex of the element with ElementIndex. |
double |
getYCoordinate(int elementIndex,
int vertexIndex)
Y-coord for the vertex with VertexIndex of the element with ElementIndex. |
double |
getZCoordinate(int elementIndex,
int vertexIndex)
Z-coord for the vertex with VertexIndex of the element with ElementIndex. |
Method Detail |
---|
java.lang.String getID()
java.lang.String getDescription()
ISpatialReference getSpatialReference()
IElementSet.ElementType getElementType()
int getElementCount()
int getVersion()
int getElementIndex(java.lang.String elementID)
elementID
- Identification String for the element for which the
element index is requested. If no element in the
ElementSet has the specified elementID, an exception
must be thrown. .java.lang.String getElementID(int elementIndex)
elementIndex
- The element index for which the element ID is
requested. If the element index is outside the range
[0, number of elements -1], and exception must be
thrown. .int getVertexCount(int elementIndex)
elementIndex
- The element index for the element for which the
number of vertices is requested.
If the element index is outside the range [0,
number of elements -1], and exception must be thrown.
.
int getFaceCount(int elementIndex)
elementIndex
- Index for the element
If the element index is outside the range [0,
number of elements -1], and exception must be thrown.
.
int[] getFaceVertexIndices(int elementIndex, int faceIndex)
elementIndex
- Element index.faceIndex
- Face index.
double getXCoordinate(int elementIndex, int vertexIndex)
elementIndex
- element index.vertexIndex
- vertex index in the element with index ElementIndex.double getYCoordinate(int elementIndex, int vertexIndex)
elementIndex
- element index.vertexIndex
- vertex index in the element with index ElementIndex.double getZCoordinate(int elementIndex, int vertexIndex)
elementIndex
- element index.vertexIndex
- vertex index in the element with index ElementIndex.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |