kiwi-postgis
Version 0.1.0.0
|
Provides various ways of computing the actual value of a point a given length along a line. More...
Public Member Functions | |
LocatePoint (LineString line, double length) | |
Coordinate | getPoint () |
int | getIndex () |
Returns the index of the segment containing the computed point. More... | |
Static Public Member Functions | |
static Coordinate | pointAlongSegment (LineSegment seg, double length) |
Computes the location of a point a given length along a LineSegment. More... | |
static Coordinate | pointAlongSegment (Coordinate p0, Coordinate p1, double length) |
Computes the location of a point a given length along a line segment. More... | |
static Coordinate | pointAlongSegmentByFraction (Coordinate p0, Coordinate p1, double frac) |
Computes the location of a point a given fraction along a line segment. More... | |
static Coordinate | pointAlongLine (LineString line, double length) |
Computes the Coordinate of the point a given length along a LineString. More... | |
Private Member Functions | |
void | compute (LineString line, double length) |
Private Attributes | |
Coordinate | pt |
int | index |
Provides various ways of computing the actual value of a point a given length along a line.
LocatePoint | ( | LineString | line, |
double | length | ||
) |
References LocatePoint.compute().
Referenced by LocatePoint.pointAlongLine().
|
private |
References Coordinate.distance(), and LocatePoint.pointAlongSegment().
Referenced by LocatePoint.LocatePoint().
int getIndex | ( | ) |
Coordinate getPoint | ( | ) |
|
static |
Computes the Coordinate of the point a given length along a LineString.
line | |
length |
References LocatePoint.getPoint(), and LocatePoint.LocatePoint().
|
static |
Computes the location of a point a given length along a LineSegment.
If the length exceeds the length of the line segment the last point of the segment is returned. If the length is negative the first point of the segment is returned.
seg | the line segment |
length | the length to the desired point |
Referenced by LocatePoint.compute(), and LengthSubstring.computeSubstring().
|
static |
Computes the location of a point a given length along a line segment.
If the length exceeds the length of the line segment the last point of the segment is returned. If the length is negative the first point of the segment is returned.
p0 | the first point of the line segment |
p1 | the last point of the line segment |
length | the length to the desired point |
References Coordinate.distance(), Coordinate.x, and Coordinate.y.
|
static |
Computes the location of a point a given fraction along a line segment.
If the fraction exceeds 1 the last point of the segment is returned. If the fraction is negative the first point of the segment is returned.
p0 | the first point of the line segment |
p1 | the last point of the line segment |
frac | the fraction of the segment to the desired point |
References Coordinate.x, and Coordinate.y.
|
private |
Referenced by LocatePoint.getIndex().
|
private |
Referenced by LocatePoint.getPoint().