|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Line
The Interface Line is a one-dimensional representation of a road or part of road in a road network. A line starts and ends at a node. It is directed, this means two-way traffic flow is represented by two (directed) lines, one per direction. A line is not abstracted by the airline between start and end node, it rather "knows" its geometry. Additional information on that line includes its functional road class and its form of way. Since the line is part of a network, its predecessors and successors are also accessible if available.
OpenLR is a trade mark of TomTom International B.V.
email: software@openlr.org
| Method Summary | |
|---|---|
int |
distanceToPoint(double longitude,
double latitude)
Calculates the (smallest) distance in meters between the line and the point given by its longitude and latitude coordinates. |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
Node |
getEndNode()
Gets the end node of the line. |
FormOfWay |
getFOW()
Gets the FormOfWay of the line. |
FunctionalRoadClass |
getFRC()
Gets the FunctionalRoadClass of the line. |
GeoCoordinates |
getGeoCoordinateAlongLine(int distanceAlong)
Gets a point along the line geometry which is distanceAlong meter
away from the start node of the line. |
long |
getID()
Gets the unique ID. |
int |
getLineLength()
Gets the length of the line indicating its real dimension along the geometry of the line. |
Map<Locale,List<String>> |
getNames()
Gets the names of the line. |
Iterator<Line> |
getNextLines()
Returns a set of lines which follows this line in the same direction. |
Point2D.Double |
getPointAlongLine(int distanceAlong)
Deprecated. This method still exists to keep backwards compatibility and will be removed in future releases, use getGeoCoordinateAlongLine(int) instead. |
Iterator<Line> |
getPrevLines()
Returns a set of lines which precedes this line in the same direction. |
Path2D.Double |
getShape()
Deprecated. This method still exists to keep backwards compatibility and will be removed in future releases, use getShapeCoordinates() instead. |
List<GeoCoordinates> |
getShapeCoordinates()
Gets the shape of the line. |
Node |
getStartNode()
Gets the start node of the line. |
int |
hashCode()
Returns a hash code value for the line. |
int |
measureAlongLine(double longitude,
double latitude)
Calculates a projection point on the line for the given coordinates and returns the distance between the start node of the line and the projection point along the line shape. |
| Method Detail |
|---|
Node getStartNode()
Node getEndNode()
FormOfWay getFOW()
FormOfWay of the line.
FunctionalRoadClass getFRC()
FunctionalRoadClass of the line.
@Deprecated Point2D.Double getPointAlongLine(int distanceAlong)
getGeoCoordinateAlongLine(int) instead.
distanceAlong meter
away from the start node of the line. If the given distance exceeds the
length of the line the end node is returned! The x-coordinate of the
point refers to the longitude value and the y-coordinate refers to the
latitude value.
distanceAlong - the distance along the geometry of the line to find the
position
distanceAlong meters away
from the start nodeGeoCoordinates getGeoCoordinateAlongLine(int distanceAlong)
distanceAlong meter
away from the start node of the line. If the given distance exceeds the
length of the line the end node is returned! The x-coordinate of the
point refers to the longitude value and the y-coordinate refers to the
latitude value.
distanceAlong - the distance along the geometry of the line to find the
position
distanceAlong meters away
from the start nodeint getLineLength()
long getID()
Iterator<Line> getPrevLines()
Iterator<Line> getNextLines()
boolean equals(Object obj)
equals in class Objectobj - the reference object with which to compare
int hashCode()
hashCode in class Object
int distanceToPoint(double longitude,
double latitude)
longitude - the longitude coordinate of the pointlatitude - the latitude coordinate of the point
int measureAlongLine(double longitude,
double latitude)
longitude - the longitude coordinate of the pointlatitude - the latitude coordinate of the point
@Deprecated Path2D.Double getShape()
getShapeCoordinates() instead.
List<GeoCoordinates> getShapeCoordinates()
Map<Locale,List<String>> getNames()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||