public class Line extends LineString
line is a LineString with 2 points.bounds, coordsGEOMETRY_ANNOTATION, GEOMETRY_COMPLEX, GEOMETRY_ELLIPSE, GEOMETRY_LINE, GEOMETRY_LINEAR_RING, GEOMETRY_LINESTRING, GEOMETRY_MULTI_ANNOTATION, GEOMETRY_MULTI_LINESTRING, GEOMETRY_MULTI_POINT, GEOMETRY_MULTI_POLYGON, GEOMETRY_POINT, GEOMETRY_POLYGON, GEOMETRY_RECTANGLE| Constructor and Description |
|---|
Line(Point[] coords) |
Line(Point a,
Point b) |
| Modifier and Type | Method and Description |
|---|---|
Point |
getCenteredPoint()
This method returns a point that is typically centered on the geometry.
|
short |
getGeometryId()
Returns the geometry class id.
|
Point |
pointOnLine(double interpolation)
This method finds the point being at a certain
percentage of the path between the starting point and the final point.
|
java.lang.String |
toString()
Returns informations about the current geometry.
|
area, boundary, clone, createBounds, endPoint, equals, getBounds, getCoords, getGeometryType, hashCode, isClosed, isRing, length, lineIterator, numPoints, pointN, serialize, setCoords, sizeOf, spatiallyEquals, spatiallyEquals, startPoint, transform, translateasText, spatiallyEqualsfinalize, getClass, notify, notifyAll, wait, wait, waitasText, spatiallyEqualspublic short getGeometryId()
LineStringgetGeometryId in interface GeometrygetGeometryId in class LineStringpublic Point pointOnLine(double interpolation)
pointOnLine in class LineStringinterpolation - the interpolation expressed as a percentage (between 0 and 1)public Point getCenteredPoint()
LineStringgetCenteredPoint in interface GeometrygetCenteredPoint in class LineStringpublic java.lang.String toString()
GeometrytoString in interface GeometrytoString in class LineString