|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectLineStringCursor
public class LineStringCursor
Allows to move a point cursor along the path of a LineString using a curvilinear coordinate system and either absolute distances (from the start of the line) or offsets relative to the current position, to return the absolute position of the cursor as a Point, and to get the orientation of the current segment.
| Constructor Summary | |
|---|---|
LineStringCursor(LineString ls)
Builds a new cursor |
|
LineStringCursor(LineStringCursor cursor)
Copy constructor |
|
| Method Summary | |
|---|---|
double |
getCurrentAngle()
Returns the current segment direction as an angle expressed in radians |
double |
getCurrentOrdinate()
|
Coordinate |
getCurrentPosition()
Returns the Point representing the current position along the LineString |
Coordinate |
getCurrentPosition(Coordinate c)
Returns the Point representing the current position along the LineString |
double |
getLabelOrientation()
Returns the current segment direction as an angle expressed in radians |
LineString |
getLineString()
The linestrings wrapped by this cursor |
double |
getLineStringLength()
Returns the line string length |
double |
getMaxAngleChange(double startOrdinate,
double endOrdinate)
Returns the maximum angle change (in radians) between two subsequent segments between the specified curvilinear coordinates. |
protected double |
getSegmentAngle(int segmentIdx)
|
LineString |
getSubLineString(double startOrdinate,
double endOrdinate)
Returns the linestring that starts and ends at the specified curvilinear coordinates. |
boolean |
moveRelative(double offset)
Moves of the specified distance from the current position. |
void |
moveTo(double ordinate)
Moves the current position to the |
LineStringCursor |
reverse()
Returns a line string cursor based on the opposite walking direction. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LineStringCursor(LineString ls)
ls - public LineStringCursor(LineStringCursor cursor)
cursor - | Method Detail |
|---|
public double getLineStringLength()
public void moveTo(double ordinate)
ordinate - public boolean moveRelative(double offset)
offset -
public Coordinate getCurrentPosition()
public Coordinate getCurrentPosition(Coordinate c)
public double getCurrentOrdinate()
public double getCurrentAngle()
protected double getSegmentAngle(int segmentIdx)
public double getLabelOrientation()
public double getMaxAngleChange(double startOrdinate,
double endOrdinate)
startOrdinate - endOrdinate -
public LineStringCursor reverse()
public LineString getLineString()
public LineString getSubLineString(double startOrdinate,
double endOrdinate)
startOrdinate - endOrdinate -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||