|
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
public abstract class IfxMultiCoord
IfxMultiCoord is a non-instantiable class holding all the common attributes and methods of geometries with more than one vertex.
IfxGeometry
Field Summary |
---|
Fields inherited from class com.ibm.spatial.geom.IfxGeometry |
---|
COORD_M, COORD_XY, COORD_Z |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object anObject)
Compares this object to the specified object. |
void |
getLabelPoint(CoordPoint point)
Calculates a reasonable point location that can be used for labeling. |
boolean |
is3D()
Tests whether or not this geometry object has three-dimensional coordinates. |
boolean |
isEmpty()
Tests whether this geometry object is empty. |
boolean |
isMeasured()
Tests whether or not this geometry object has measures. |
double |
length()
Returns the length of this object. |
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. |
double |
perimeter()
Returns the perimeter of this object, as measured in the spatial reference system of 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 index. |
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 index (relative to the current subpart beginning position), into pointArray. |
Methods inherited from class com.ibm.spatial.geom.IfxGeometry |
---|
area, asBinary, asText, boundary, buffer, clone, contains, convexHull, crosses, difference, dimension, disjoint, distance, envelope, envelopesIntersect, extent, exterior, geometryType, 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 |
Method Detail |
---|
public boolean isEmpty()
isEmpty
in interface Geometry
isEmpty
in class IfxGeometry
public boolean is3D()
is3D
in interface Geometry
is3D
in class IfxGeometry
public boolean isMeasured()
isMeasured
in interface Geometry
isMeasured
in class IfxGeometry
public int numPoints()
numPoints
in interface Geometry
numPoints
in class IfxGeometry
public void getLabelPoint(CoordPoint point) throws SpatialException
This implementation returns the center of this object's envelope. In order to modify the behavior of this method, subclasses must override calcLabelPoint.
getLabelPoint
in class IfxGeometry
point
- a CoordPoint object to be filled with the coordinates
of the label point. Returns an empty point if this geometry
is empty.
SpatialException
- if an error occurs during the calculation
of the label point coordinatespublic double length()
length
in class IfxGeometry
public double perimeter()
perimeter
in class IfxGeometry
length()
public boolean equals(java.lang.Object anObject)
The coordinates are compared within the precision specified by this object's SRS.
equals
in interface Geometry
equals
in class IfxGeometry
anObject
- the object to compare this object against.
public int numParts()
numParts
in class IfxGeometry
public int numSubParts(int part)
numSubParts
in class IfxGeometry
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 IfxGeometry
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 index. The value of index is relative to the beginning of the current subpart.
The order in which coordinates are returned is specified as follows: - COORD_XY - the return sequence is: X,Y,X,Y,... - COORD_XY | COORD_Z - the return sequence is: X,Y,Z,X,Y,Z,... - COORD_XY | COORD_Z | COORD_M - the return sequence is: X,Y,Z,M,X,Y,Z,M,... - COORD_Z | COORD_M - the return sequence is: Z,M,Z,M,... etc.
The number of points read is limited by the available space in the destination buffer, and the number of remaining points in the current part/subpart.
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.
toCoordArray
in class IfxGeometry
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.srcOffset
- the position of the first point whose coordinates
are copied, 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 index (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.
If pointArray is reused for several calls, this method may be used to save allocation costs.
toPointArray
in class IfxGeometry
pointArray
- the array of CoordPoints where point
coordinates are copied intodestOffset
- start position in the destination array pointArraysrcOffset
- position of the first point whose coordinates
are returned, relative to the beginning of the specified
part and subpartpart
- current geometry part (see numParts
)subPart
- 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 |