|
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.IfxPoint
public class IfxPoint
An implementation of the Point interface, plus additional convenience methods.
Field Summary |
---|
Fields inherited from class com.ibm.spatial.geom.IfxGeometry |
---|
COORD_M, COORD_XY, COORD_Z |
Method Summary | |
---|---|
int |
dimension()
Returns the dimension of this geometry object. |
boolean |
equals(java.lang.Object anObject)
Compares this IfxPoint to the specified object. |
java.lang.String |
geometryType()
Gets the most appropriate OGC geometry interface type for this 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. |
boolean |
isSimple()
Tests whether this geometry object is simple (has no anomalous geometric points, such as self intersection or self tangency). |
double |
M()
Returns the measure associated with this point. |
int |
numParts()
Returns the number of parts of this object, that is 1 for a non-empty point and 0 for an empty point. |
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 |
ordAt(int index)
Gets the coordinate specified by index n, where n=0 corresponds to x, n=1 to y, n=2 to z, and n=3 to m. |
int |
toCoordArray(double[] buf,
int destOffset,
int coordType,
int srcOffset,
int part,
int subPart)
This method overrides IfxGeometry#toCoordArray. |
CoordPoint |
toCoordPoint()
Returns a CoordPoint object containing the coordinates of this point. |
void |
toCoordPoint(CoordPoint p)
Fills in the CoordPoint argument with the coordinates of this point. |
int |
toPointArray(CoordPoint[] pointArray,
int destOffset,
int srcOffset,
int part,
int subPart)
This method overrides IfxGeometry#toPointArray. |
double |
X()
Returns the x coordinate of this point. |
double |
Y()
Returns the y coordinate of this point. |
double |
Z()
Returns the Z coordinate of this point. |
Methods inherited from class com.ibm.spatial.geom.IfxGeometry |
---|
area, asBinary, asText, boundary, buffer, clone, contains, convexHull, crosses, difference, disjoint, distance, envelope, envelopesIntersect, extent, exterior, getCoordinateDimension, getDimensionality, getLabelPoint, getOGCType, interior, intersection, intersects, isValid, length, locateAlong, locateBetween, overlaps, perimeter, 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, isValid, locateAlong, locateBetween, overlaps, srid, symmetricDiff, touches, union, within |
Method Detail |
---|
public double X()
X
in interface Point
public double Y()
Y
in interface Point
public double ordAt(int index)
ordAt
in interface Point
n
- the measure value
public int dimension()
Returns the dimension of this geometry object. A geometry's dimension can be:
dimension
in interface Geometry
dimension
in class IfxGeometry
public java.lang.String geometryType()
geometryType
in class IfxGeometry
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 boolean isSimple()
Tests whether this geometry object is simple (has no anomalous geometric points, such as self intersection or self tangency).
For example, a LineString is simple if it does not intersect its interior. A MultiPoint is simple if none of its elements occupy the same coordinate space. A MultiLineString is simple if none of its element's interiors intersect.
isSimple
in interface Geometry
isSimple
in class IfxGeometry
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 IfxPoint
against.
public int numPoints()
numPoints
in interface Geometry
numPoints
in class IfxGeometry
public void getLabelPoint(CoordPoint point)
getLabelPoint
in class IfxGeometry
point
- a CoordPoint object to be filled with the coordinates
of the label pointpublic double M()
public double Z()
public CoordPoint toCoordPoint()
public void toCoordPoint(CoordPoint p)
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)
This method overrides IfxGeometry#toCoordArray. It copies the coordinates out of the specified part and subpart of this point, starting with the position specified by index. The value of index is relative to the beginning of the current subpart.
The number of points read count is equal to the smaller of buf.length and numPoints(part, subpart)-index. If count is positive, then coordinates of the points starting with position index through index+count-1 are copied into buf. The value count is returned.
Note: because of its generality, this method incurs a significant overhead. For faster access to this point's coordinates, use X(), Y(), Z(), M().
toCoordArray
in class IfxGeometry
buf
- the array of double where point coordinates are
returned. If buffer is null, an error is reportedbufOffset
- 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...srcOffset
- the position of the first point whose coordinates
are copied, relative to the beginning of the specified
part and subpart - for a point, this should be 0part
- the current geometry part (see numParts
);
for a point, this should be 0subPart
- the current subpart (see numParts
);
for a point, this should be 0
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)
This method overrides IfxGeometry#toPointArray. It 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 and numPoints(part, subpart)-index. If count is positive, then points starting with position index through index+count-1 are copied into buf. The value count is returned.
Note: because of its generality, this method incurs a significant overhead. For faster access to this point's coordinates, use X(), Y(), Z(), M().
toPointArray
in class IfxGeometry
pointArray
- the array of CoordPoints where point
coordinates are copied intodestOffset
- start position in the destination array pointArraysrcOffset
- the position of the first point whose coordinates
are returned, relative to the beginning of the specified part / 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 |