Spatial DataBlade
JAVA API v8.21

com.ibm.spatial.geom
Interface LineString

All Superinterfaces:
Curve, Geometry
All Known Implementing Classes:
IfxLineString

public interface LineString
extends Curve

A LineString is a Curve with linear interpolation between points. Each consecutive pair of points defines a line segment.

This interface extends the OGC Simple Features Specification with convenience methods to provide access to the vertices of a LineString.

See Also:
Geometry, Curve, MultiLineString

Method Summary
 void getPointAt(CoordPoint p, int index)
          Returns the vertex at the specified position in this geometry.
 CoordPoint getPointAt(int index)
          Returns the vertex at the specified position in this LineString.
 int numPoints()
          Returns the number of points in this LineString.
 Point pointN(int index)
          Returns the vertex at the specified position in this LineString.
 
Methods inherited from interface com.ibm.spatial.geom.Curve
endPoint, endPoint, isClosed, isRing, length, startPoint, startPoint, value
 
Methods inherited from interface com.ibm.spatial.geom.Geometry
asBinary, asText, boundary, buffer, contains, convexHull, crosses, difference, dimension, disjoint, distance, envelope, envelopesIntersect, equals, extent, exterior, interior, intersection, intersects, is3D, isEmpty, isMeasured, isSimple, isValid, locateAlong, locateBetween, overlaps, srid, symmetricDiff, touches, union, within
 

Method Detail

numPoints

int numPoints()
Returns the number of points in this LineString.

Specified by:
numPoints in interface Geometry
Returns:
the number of points in this LineString.

pointN

Point pointN(int index)
Returns the vertex at the specified position in this LineString.

Parameters:
index - index of the point to return
Returns:
the point at the specified position in this LineString
Throws:
SpatialException - if the index is out of range (index < 0 || index >= numPoints()).
See Also:
getPointAt(int)

getPointAt

CoordPoint getPointAt(int index)
Returns the vertex at the specified position in this LineString.

Parameters:
index - index of element to return.
Returns:
the vertex at the specified position in this list.
Throws:
SpatialException - if the index is out of range (index < 0 || index >= numPoints()).
See Also:
pointN(int)

getPointAt

void getPointAt(CoordPoint p,
                int index)
Returns the vertex at the specified position in this geometry.

Parameters:
p - placeholder for the coordinates to be returned
index - index of the element to return
Throws:
SpatialException - if the index offset is out of range (offset < 0 || offset >= numPoints()).
See Also:
Geometry.numPoints()

Spatial DataBlade
JAVA API v8.21


Licensed Materials - Property of IBM
Copyright IBM Corp. 2002, 2012 All Rights Reserved.