|
Spatial DataBlade JAVA API v8.21 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.spatial.geom.IfxGeometry
com.ibm.spatial.geom.IfxMultiCoord
com.ibm.spatial.geom.IfxGeometryCollection
public class IfxGeometryCollection
A IfxGeometryCollection is a geometry that implements the GeometryCollection interface.
This implementation allows geometry members of different types to be stored in the same IfxGeometryCollection object (heterogeneous collection). However, all the members must have the same srid and subtype (Z, M, ZM...).
Descendents of this class may enforce type homogeneity.
GeometryCollection
,
Geometry
,
IfxGeometry
Field Summary |
---|
Fields inherited from class com.ibm.spatial.geom.IfxGeometry |
---|
COORD_M, COORD_XY, COORD_Z |
Method Summary | |
---|---|
double |
area()
Returns the area of this object, as measured in the spatial reference system of this object. |
int |
dimension()
Returns the dimension of this geometry object. |
boolean |
equals(java.lang.Object anObject)
Compares this object to the specified object. |
Geometry |
geometryN(int index)
Returns the Geometry at the specified position in this collection. |
java.lang.String |
geometryType()
Gets the most appropriate OGC geometry interface type for this object. |
int |
numGeometries()
Returns the number of Geometries in this collection. |
int |
numParts()
Returns the number of parts of this object. |
int |
numPoints()
Returns the number of points in this geometry. |
int |
numPoints(int part,
int subPart)
Returns the number of points in the specified part and subpart. |
int |
numSubParts(int part)
Returns the number of subparts in the specified part. |
Geometry[] |
toArray()
Returns an array containing all of the Geometries in this object. |
int |
toCoordArray(double[] buf,
int destOffset,
int coordType,
int srcOffset,
int part,
int subPart)
Gets the coordinates of up to count points from the specified part and subpart of this object, starting with the position specified by srcOffset. |
int |
toPointArray(CoordPoint[] pointArray,
int destOffset,
int srcOffset,
int part,
int subPart)
Copies up to count points from the specified part and subpart of this object, starting with the point at the position specified by srcOffset (relative to the current subpart beginning position), into pointArray. |
Methods inherited from class com.ibm.spatial.geom.IfxMultiCoord |
---|
getLabelPoint, is3D, isEmpty, isMeasured, length, perimeter |
Methods inherited from class com.ibm.spatial.geom.IfxGeometry |
---|
asBinary, asText, boundary, buffer, clone, contains, convexHull, crosses, difference, disjoint, distance, envelope, envelopesIntersect, extent, exterior, getCoordinateDimension, getDimensionality, getLabelPoint, getOGCType, interior, intersection, intersects, isSimple, isValid, locateAlong, locateBetween, overlaps, srid, symmetricDiff, toString, touches, union, within |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ibm.spatial.geom.Geometry |
---|
asBinary, asText, boundary, buffer, contains, convexHull, crosses, difference, disjoint, distance, envelope, envelopesIntersect, extent, exterior, interior, intersection, intersects, is3D, isEmpty, isMeasured, isSimple, isValid, locateAlong, locateBetween, overlaps, srid, symmetricDiff, touches, union, within |
Method Detail |
---|
public int numGeometries()
numGeometries
in interface GeometryCollection
public Geometry geometryN(int index) throws SpatialException
geometryN
in interface GeometryCollection
index
- index of element to return.
java.lang.IndexOutOfBoundsException
- if the index is out of range (index
< 0 || index >= numGeometries()).
SpatialException
- wrapping another exceptionpublic int dimension()
Returns the dimension of this geometry object.
dimension
in interface Geometry
dimension
in class IfxGeometry
Geometry.dimension()
public java.lang.String geometryType()
geometryType
in class IfxGeometry
public boolean equals(java.lang.Object anObject)
equals
in interface Geometry
equals
in class IfxMultiCoord
anObject
- the object to compare this object
against.
public int numPoints()
numPoints
in interface Geometry
numPoints
in class IfxMultiCoord
public double area()
area
in class IfxGeometry
public Geometry[] toArray() throws SpatialException
SpatialException
- wrapping another exceptionpublic int numParts()
In case of a heterogeneous collection, it is assumed that each collection member has a single part and one or possibly several subparts. In other words, none of the collection members is a GeometryCollection or GeometryCollection descendent.
In case of homogeneous collections, this function calls its superclass implementation.
numParts
in class IfxMultiCoord
IfxGeometry.numParts()
public int numSubParts(int part)
It is assumed that each collection member has a single part and one or possibly several subparts. In other words, none of the collection members is a GeometryCollection descendent.
In case of homogeneous collections, this function calls its superclass implementation.
numSubParts
in class IfxMultiCoord
part
- part index
java.lang.IndexOutOfBoundsException
- - for non-empty geometries,
if the given part index is out of range
(part < 0 || part >= numParts()).numParts()
public int numPoints(int part, int subPart)
numPoints
in class IfxMultiCoord
part
- part indexsubPart
- subpart index
java.lang.IndexOutOfBoundsException
- - for non-empty geometries,
if the given part and subpart indexes are out of range
(part < 0 || part >= numParts()) ||
(subPart < 0 || subPart >= numSubParts(part)).numParts()
,
numSubParts(int)
public int toCoordArray(double[] buf, int destOffset, int coordType, int srcOffset, int part, int subPart)
Gets the coordinates of up to count points from the specified part and subpart of this object, starting with the position specified by srcOffset. The value of srcOffset is relative to the beginning of the current subpart.
The number of points read is limited by numPoints, the available space in the destination buffer, and the number of remaining points in the current part/subpart.
It is assumed that each collection member has a single part and one or possibly several subparts. In other words, none of the collection members is a GeometryCollection descendent.
toCoordArray
in class IfxMultiCoord
buf
- the array of double where point coordinates are
returned. If buffer is null, an error is reporteddestOffset
- the starting position in the destination buffer
where coordinates are writtencoordType
- specifies which coordinates are returned.
It may be any combination of the flag values
COORD_XY, COORD_Z, and COORD_M.
If coordType equals COORD_XY, the return sequence
is: X,Y,X,Y,...
If coordType equals
IfxGeometry.COORD_XY | IfxGeometry.COORD_Z, then the
return sequence is: X,Y,Z,X,Y,Z,...
If coordType equals
IfxGeometry.COORD_XY | IfxGeometry.COORD_Z | IfxGeometry.COORD_M,
then the return sequence is: X,Y,Z,M,X,Y,Z,M...
Note: in case of geometries with more than one point, if coordType only equals one of the flag values, then the coordinate values are copied into the buffer in the manner performed by System.arraycopy.
srcOffset
- position of the first point whose coordinates are
copied into the destination array, relative to the beginning
of the specified part and subpartpart
- the current geometry part (see numParts
)subpart
- the current subpart (see numParts
)
java.lang.IndexOutOfBoundsException
- - if case of non-empty geometries,
if an attempt is made to write past the destination array
boundaries or the given part and subpart indexes are out of range
(part < 0 || part >= numParts()) ||
(subPart < 0 || subPart >= numSubParts(part)).IfxGeometry.COORD_XY
,
IfxGeometry.COORD_Z
,
IfxGeometry.COORD_M
public int toPointArray(CoordPoint[] pointArray, int destOffset, int srcOffset, int part, int subPart)
Copies up to count points from the specified part and subpart of this object, starting with the point at the position specified by srcOffset (relative to the current subpart beginning position), into pointArray.
The number of points read count is equal to the smaller of pointArray.length-destOffset and numPoints(part, subpart)-srcOffset. If count is positive, then points starting with position srcOffset through srcOffset+count-1 are copied into buf. The value count is returned.
It is assumed that each collection member has a single part and one or possibly several subparts. In other words, none of the collection members is a GeometryCollection descendent.
If pointArray is reused for several calls, this method may be used to save allocation costs.
toPointArray
in class IfxMultiCoord
pointArray
- the array of CoordPoints where point
coordinates are returneddestOffset
- start position in the destination buffer pointArraysrcOffset
- position of the first point whose coordinates are
copied into the destination array, relative to the beginning
of the specified part and subpartpart
- the current geometry part (see numParts
)subpart
- the current subpart (see numParts
)
java.lang.IndexOutOfBoundsException
- - if case of non-empty geometries,
if an attempt is made to write past the destination array
boundaries or the given part and subpart indexes are out of range
(part < 0 || part >= numParts()) ||
(subPart < 0 || subPart >= numSubParts(part)).
|
Spatial DataBlade JAVA API v8.21 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |