package olr
Type Members
- case class AbsoluteGeoCoordinate(longitude: Int, latitude: Int, altitude: Option[Int]) extends Product with Serializable
An absolute geocoordinate in WGS84 using 24 bit-resolution.
An absolute geocoordinate in WGS84 using 24 bit-resolution. The integer (
intAngle) representation for the latitude and longitude can be calculated from a double representation in degrees (degrees) by scaling and rounding:intAngle = Math.round(degrees * Math.pow(2, 24) / 360)In the interest of comparability a specific rounding rule is suggested in the standard:
intAngle = 0.5 * Math.signum(degrees) + degrees * Math.pow(2, 24) / 360The conversion back can be done as follows:
degrees = intAngle * 360 / Math.pow(2, 24))- longitude
The longitude value.
- latitude
The latitude value.
- altitude
An optional elevation value in meters above sea level.
- sealed trait AbstractLocationReference extends AnyRef
The base type for all OpenLR reference types.
- sealed trait AbstractShape extends AnyRef
The interface for shapes.
- case class Bearing(value: Short) extends Product with Serializable
Describing the bearing of a line.
Describing the bearing of a line. The angle is measured clockwise between north and the direction of the line in question. The value is stored in a byte at 8bit resolution, i.e. the integer value can be calculated as follows:
bearingValue = Math.round(bearingInDegrees * 256 / 360)- value
The angle in 8bit resolution.
- case class CircleLocationReference(centerPoint: AbsoluteGeoCoordinate, radius: Long, isFuzzyArea: Boolean) extends AbstractLocationReference with Product with Serializable
A
CircleLocationReferencerefers to an area described by the geometric shape of a circle and is not tied to the road network.A
CircleLocationReferencerefers to an area described by the geometric shape of a circle and is not tied to the road network.- centerPoint
The center point of the circle.
- radius
The radius measured in meters.
- isFuzzyArea
The circle is to be interpreted as a rough enclosing circle rather than the exact location.
- case class ClosedLinearLocationReference(first: FirstLocationReferencePoint, intermediates: Seq[IntermediateLocationReferencePoint], last: LineProperties, shape: Option[Shape]) extends AbstractLocationReference with Product with Serializable
A
ClosedLinearLocationReferencerefers to an area that is circumscribed by a closed path in the road network, e.g.A
ClosedLinearLocationReferencerefers to an area that is circumscribed by a closed path in the road network, e.g. an area with certain parking restrictions.- first
The first reference point of the closed linear location.
- intermediates
An ordered sequence of intermediate reference points.
- last
The last reference point. The line properties of the last reference point are combined with the coordinates of the first reference point to describe the closing path of the closed linear location.
- shape
An optional shape describing the location geometry.
- case class DistanceMetresMax15000(value: Long) extends Product with Serializable
Represents a distance with a precision of 1 meter and a maximum value of up to 15000 meters.
Represents a distance with a precision of 1 meter and a maximum value of up to 15000 meters.
- value
Distance in meters, where value ≤ 15000.
- case class FirstLocationReferencePoint(coordinate: AbsoluteGeoCoordinate, lineProperties: LineProperties, pathProperties: PathProperties) extends Product with Serializable
Represents a first reference point for a location reference in the road network.
Represents a first reference point for a location reference in the road network.
- coordinate
The position of this reference point. When creating a reference, this should be at a proper intersection. Note that an intersection in the map of the reference creator is not neccessarily present in the map of the receiver.
- lineProperties
The properties of the first section of the path to the next reference point.
- pathProperties
The properties of the full path from this reference point to the next reference point.
- case class FormOfWay(code: Short) extends Product with Serializable
Describing the type of the road.
Describing the type of the road. Possible values are:
Code Description 0 undefined 1 motorway 2 multiple carriageway 3 single carriageway 4 roundabout 5 traffic square 6 sliproad 7 other 8 bike path 9 footpath 10 pedestrian zone - code
The numeric code representing this
FormOfWayvalue.
- case class FunctionalRoadClass(code: Short) extends Product with Serializable
Describes the class of the road in the road network.
Describes the class of the road in the road network. The value range is from 0 to 7, where 0 is the most important road class and 7 is the least important road class.
- case class GeoCoordinateLocationReference(coordinate: AbsoluteGeoCoordinate) extends AbstractLocationReference with Product with Serializable
A
GeoCoordinateLocationReferencerefers to a point described by a pair of geocoordinates.A
GeoCoordinateLocationReferencerefers to a point described by a pair of geocoordinates. It is not bound to the road network.- coordinate
The geocoordinates of the referenced location.
- case class GridLocationReference(baseElement: Rectangle, nrColumns: Int, nrRows: Int, isFuzzyArea: Boolean) extends AbstractLocationReference with Product with Serializable
A
GridLocationReferencerefers to a rectangular grid that is not tied to the road network.A
GridLocationReferencerefers to a rectangular grid that is not tied to the road network.The grid is described based on a rectangle defining the southwesternmost cell which then gets extended to the north and east respectively. The grid coordinates can later be used to refer to the cells of the grid using their column and row numbers, e.g. for local weather reports.
- baseElement
The southwesternmost (lower left) cell of the grid.
- nrColumns
Number of columns (to the east), with
nrColumns> 1.- nrRows
Number of rows (to the north), with
nrRows> 1.- isFuzzyArea
The grid is to be interpreted as a rough enclosing rectangle rather than the exact location.
- case class IntermediateLocationReferencePoint(coordinate: RelativeGeoCoordinate, lineProperties: LineProperties, pathProperties: PathProperties) extends Product with Serializable
Represents an intermediate reference point for a location reference in the road network.
Represents an intermediate reference point for a location reference in the road network.
- coordinate
The position of this reference point relative to the previous reference point. When creating a reference, this should be at a proper intersection. As the distance along the path between two reference points must not exceed 15km a reference point might have to be placed in the middle of a road section.
- lineProperties
The properties of the first section of the path to the next reference point.
- pathProperties
The properties of the full path from this reference point to the next reference point.
- case class LastLocationReferencePoint(coordinate: RelativeGeoCoordinate, lineProperties: LineProperties) extends Product with Serializable
Represents the last reference point for a location reference in the road network.
- case class LineProperties(frc: FunctionalRoadClass, fow: FormOfWay, bearing: Bearing, srBearingLeft: Option[Bearing], srBearingRight: Option[Bearing]) extends Product with Serializable
LinePropertiesspecify the properties of the the road section directly adjacent to a reference point.LinePropertiesspecify the properties of the the road section directly adjacent to a reference point.In the case of a first or intermediate reference point this is the section immediately after the reference point. In the case of a last reference point it is the section leading to the reference point, unless we are dealing with a
ClosedLinearLocationReference, in which case they describe the first section of the path leading back to the first reference point.- frc
The functional road class of the section.
- fow
The form of way of the section.
- bearing
The bearing of the road at the beginning of the described section. The bearing is the angle between the start of the section and the point 20m into the section.
- srBearingLeft
Optional bearing of road on the left hand side of the referenced line.
- srBearingRight
Optional bearing of road on the right hand side of the referenced line.
- case class LinearLocationReference(first: FirstLocationReferencePoint, last: LastLocationReferencePoint, intermediates: Seq[IntermediateLocationReferencePoint], positiveOffset: Option[DistanceMetresMax15000], negativeOffset: Option[DistanceMetresMax15000], shape: Option[Shape]) extends AbstractLocationReference with Product with Serializable
A
LinearLocationReferencerefers to a path in the road network in a map neutral and compressed way.A
LinearLocationReferencerefers to a path in the road network in a map neutral and compressed way.The basic idea is to provide coordinates at the start and at the end of the location as well as optional intermediate points. Then a routing algorithm can be used to determine the actual path in the map of the receiver.
- first
The first reference point. To facilitate map matching the first reference point is always at an intersection in the road network. If the start of the location that is referred to does not coincide with an intersection, the
positiveOffsetis used to indicate the actual start of the location.- last
The last reference point. To facilitate map matching the last reference point is always at an intersection in the road network. If the end of the location that is referred to does not coincide with an intersection, the
negativeOffsetis used to indicate the actual end of the location.- intermediates
The sequence of intermediate reference points.
- positiveOffset
Distance in meters between the first reference point and the start of the referenced location.
- negativeOffset
Distance in meters between the end of the referenced location and the last reference point.
- shape
Optional description of the geometry of the location.
- case class LocationDescription(descriptions: Seq[LocalisedLongString]) extends Product with Serializable
A localized description of a location.
A localized description of a location.
- descriptions
Localized texts.
- case class OpenLRLocationReference(version: String, locationReference: AbstractLocationReference, locationDescription: Option[LocationDescription]) extends ApplicationRootMessageML with Method with Product with Serializable
Container for a location references providing additional meta-data.
Container for a location references providing additional meta-data.
- version
The version of OpenLR used to create this reference. The String representation has to match the following format
{major}.{minor}, wheremajorandminorare numbers between 0 and 15 as the binary representation uses a byte for this field.- locationReference
The actual location reference.
- locationDescription
An optional textual description of this reference.
- case class Orientation(code: Short) extends Product with Serializable
Describes the relationship between a POI and the driving direction on the referenced road section.
Describes the relationship between a POI and the driving direction on the referenced road section. Possible values are:
Code Description 0 no orientation or unknown orientation 1 with the direction of the referenced road section 2 against the direction of the referenced road section 3 both directions - code
The numeric code representing this
Orientationvalue.
- case class POIWithAccessPointLocationReference(lineWithAccessPoint: PointLocationLineReferenceData, poi: RelativeGeoCoordinate, shape: Option[Shape], pathToPoi: Option[Path]) extends AbstractLocationReference with Product with Serializable
A
POIWithAccessPointLocationReferencedescribes a point of interest (POI) and an access point to that POI on the road network, for example an entry to a car park associated with the POI.A
POIWithAccessPointLocationReferencedescribes a point of interest (POI) and an access point to that POI on the road network, for example an entry to a car park associated with the POI.- lineWithAccessPoint
The network-bound part defining the access point to the POI.
- poi
The position of the POI.
- shape
An optional shape describing the location geometry.
- pathToPoi
An optional path from the access point to the POI.
- case class Path(points: Seq[AbsoluteGeoCoordinate]) extends AbstractShape with Product with Serializable
A
Pathspecifies a sequence of coordinates defining a path.A
Pathspecifies a sequence of coordinates defining a path.- points
The points making up this path.
- case class PathProperties(lfrcnp: FunctionalRoadClass, dnp: DistanceMetresMax15000, againstDrivingDirection: Boolean) extends Product with Serializable
PathPropertiesspecify the properties of the full path betweeen subsequent reference points.PathPropertiesspecify the properties of the full path betweeen subsequent reference points.- lfrcnp
The lowest functional road class on the path to the next reference point. Note that the "lowest functional road class" means "least important functional road class", which is actually encoded with the highest numeric value.
- dnp
The distance in meters along the path to the next reference point.
- againstDrivingDirection
A value of
trueindicates all the sections of this path are referenced against the direction of travel.
- case class PointAlongLineLocationReference(pointAlongLine: PointLocationLineReferenceData, shape: Option[Shape]) extends AbstractLocationReference with Product with Serializable
A
PointAlongLineLocationReferencerefers to a point relative to a road sections in a map-agnostic fashion.A
PointAlongLineLocationReferencerefers to a point relative to a road sections in a map-agnostic fashion.The advantage over using a
GeoCoordinateLocationReferenceis that the relative position to the road is maintained even if there are slight deviations between maps.- pointAlongLine
The actual road network bound reference.
- shape
An optional shape describing the location geometry.
- case class PointLocationLineReferenceData(first: FirstLocationReferencePoint, last: LastLocationReferencePoint, sideOfRoad: SideOfRoad, orientation: Orientation, positiveOffset: Option[DistanceMetresMax15000]) extends Product with Serializable
The reference data for a point along a line.
The reference data for a point along a line.
- first
The first reference point at the intersection before the referenced point location.
- last
The second (and last) reference point at the intersection after the referenced point location.
- sideOfRoad
Indicates on which side of the road (relative to the direction of the reference) the point is located.
- orientation
Indicates the orientation with regard to the direction of driving.
- positiveOffset
Distance in meters between the first reference point and the referenced point location.
- case class PolygonLocationReference(startCoordinate: AbsoluteGeoCoordinate, coordinatePaths: Seq[RelativeGeoCoordinate], isFuzzyArea: Boolean) extends AbstractLocationReference with Product with Serializable
A
PolygonLocationReferencerefers to an area described by the geometric shape of a polygon and is not tied to the road network.A
PolygonLocationReferencerefers to an area described by the geometric shape of a polygon and is not tied to the road network.- startCoordinate
The first corner of the polygon.
- isFuzzyArea
The polygon is to be interpreted as a rough enclosing polygon rather than the exact location.
- case class Rectangle(lowerLeftCoordinate: AbsoluteGeoCoordinate, upperRightCoordinate: AbsoluteGeoCoordinate) extends Product with Serializable
A rectangle specified in geocoordinates.
A rectangle specified in geocoordinates.
- lowerLeftCoordinate
The southwestern (lower left) corner of the rectangle.
- upperRightCoordinate
The northeastern (upper right) corner of the rectangle.
- case class RectangleLocationReference(rectangle: Rectangle, isFuzzyArea: Boolean) extends AbstractLocationReference with Product with Serializable
A
RectangleLocationReferencerefers to an area described by the geometric shape of a rectangle and is not tied to the road network.A
RectangleLocationReferencerefers to an area described by the geometric shape of a rectangle and is not tied to the road network.- rectangle
The rectangle geometry.
- isFuzzyArea
The rectangle is to be interpreted as a rough enclosing rectangle rather than the exact location.
- case class RelativeGeoCoordinate(longitude: Short, latitude: Short, altitude: Option[Int]) extends Product with Serializable
A
RelativeGeoCoordinateis used to represent a geocoordinate in terms of a previous position, e.g.A
RelativeGeoCoordinateis used to represent a geocoordinate in terms of a previous position, e.g. to describe a path in a space-efficient way. The resolution of the relative coordinates is 1E-5 degrees. The integer representation can be calculated as follows from double coordinates in degrees:relativeAngle = Math.round(100000 * (currentAngle - previousAngle))- longitude
Relative longitude in 1E-5 degrees.
- latitude
Relative latitude in 1E-5 degrees.
- altitude
An optional elevation value in meters above sea level.
- case class Shape(points: Seq[AbsoluteGeoCoordinate]) extends AbstractShape with Product with Serializable
A
Shapespecified by a sequence of coordinates.A
Shapespecified by a sequence of coordinates.- points
The points making up this shape.
- case class SideOfRoad(code: Short) extends Product with Serializable
Describes the the side of the road that the POI is on.
Describes the the side of the road that the POI is on. This is relative to the direction of the referenced road section. Possible values are:
Code Description 0 directly on the road or unknown 1 on the right side of the referenced road section 2 on the left side of the referenced road section 3 on both sides of the road - code
The numeric code representing this
SideOfRoadvalue.