Class LocationReferenceCreators
LocationReferenceCreators factories to
create different location reference types from Location Library data model specific
representations.-
Constructor Summary
ConstructorsConstructorDescriptionLocationReferenceCreators(OptimizedMapLayers optimizedMapLayers) LocationReferenceCreators(OptimizedMapLayers optimizedMapLayers, TmcAdjacencyProvider adjacencyProvider) -
Method Summary
Modifier and TypeMethodDescriptionGenerates a creator forExtendedTMCLocationReferences.olr()Generates a creator forOpenLRLocationReferences fromReferencingLocations.Generates a creator forCircleLocationReference.Generates a creator forClosedLinearLocationReferences.Generates a creator forGeoCoordinateLocationReference.static <GC> LocationReferenceCreator<GC,GeoCoordinateLocationReference> olrGeoCoordinate(GeoCoordinateAdapter<GC> adapter) Generates a creator forGeoCoordinateLocationReference.static <GC extends GeoCoordinateHolder>
LocationReferenceCreator<GC,GeoCoordinateLocationReference> Generates a creator forGeoCoordinateLocationReference.olrGrid()Generates a creator forGridLocationReference.Generates a creator forLinearLocationReferences.Generates a creator forPointAlongLineLocationReferences.Generates a creator forPOIWithAccessPointLocationReferences.Generates a creator forPolygonLocationReference.static <LR,P> LocationReferenceCreator<LR, PolygonLocationReference> olrPolygon(LinearRingAdapter<LR, P> linearRingAdapter, GeoCoordinateAdapter<P> pointAdapter) Generates a creator forPolygonLocationReference.static <LR extends LinearRingHolder<C>,C extends GeoCoordinateHolder>
LocationReferenceCreator<LR,PolygonLocationReference> Generates a creator forPolygonLocationReference.Generates a creator forRectangleLocationReference.static <BB> LocationReferenceCreator<BB,RectangleLocationReference> olrRectangle(BoundingBoxAdapter<BB> adapter) Generates a creator forRectangleLocationReference.static <BB extends BoundingBoxHolder>
LocationReferenceCreator<BB,RectangleLocationReference> Generates a creator forRectangleLocationReference.Generates a creator forPiecewiseTmcCoverage.tmc()Generates a creator for simpleTMCLocationReferences.
-
Constructor Details
-
LocationReferenceCreators
-
LocationReferenceCreators
public LocationReferenceCreators(OptimizedMapLayers optimizedMapLayers, TmcAdjacencyProvider adjacencyProvider) - Parameters:
adjacencyProvider- Provides information about TMC location adjacency to support creation of references withextent> 1.
-
-
Method Details
-
tmc
Generates a creator for simpleTMCLocationReferences.This reference creator takes a
LinearLocationand returns a simple TMC location reference. The simple TMC reference will havepreciseTMCInfopopulated to match theLinearLocationthat was passed in. The resolution of the producedPreciseTMCInformationis 100m. The rounding is done in such a way that the TMC reference covers the full linear location, so it might be up to 100m longer at each end.Because TMC relies on pre-coded, shared location tables, it is possible that a
LinearLocationcan not be encoded in TMC. In such cases the creator will throw aTmcCreatorException.For details on how TMC works, see the Developer Guide.
Note that without passing in a valid
adjacencyProviderthis API only supports creating references withextent< 1. If noadjacencyProvideris given, the creator will fail with aNoLinearAvailableExceptionif the given location is not fully covered by the same location code. -
extendedTmc
Generates a creator forExtendedTMCLocationReferences.This reference creator takes a
LinearLocationand returns an extended TMC location reference. The extended TMC reference will havepreciseTMCInfopopulated to match theLinearLocationthat was passed in. The resolution of the producedPreciseTMCInformationis 100m. The rounding is done in such a way that the TMC reference covers the full linear location, so it might be up to 100m longer at each end.This creator will always return
ExtendedTMCLocationReferences that contain atmcLocation, not atmcExitEntryLocation.Because TMC relies on pre-coded, shared location tables, it is possible that a
LinearLocationcan not be encoded in TMC. In such cases the creator will throw aTmcCreatorException.For details on how TMC works, see the Developer Guide.
Note that this method has the same behavior as the corresponding V2 static method.
Note that without passing in a valid
adjacencyProviderthis API only supports creating references withextent< 1. If noadjacencyProvideris given, the creator will fail with aNoLinearAvailableExceptionif the given location is not fully covered by the same location code. -
piecewiseExtendedTmc
Generates a creator forPiecewiseTmcCoverage.Because TMC relies on pre-coded, shared location tables, it is possible that a
LinearLocationcan not be encoded or not fully encoded in TMC.This reference creator takes a
LinearLocationand returns the potentially piecewise TMC coverage for those parts of the givenLinearLocationthat can be encoded into TMC.The extended TMC references will have
preciseTMCInfopopulated to match theLinearLocationthat was passed in. The resolution of the producedpreciseTMCInfois 100m. The rounding is done in such a way that the TMC reference covers the full linear location, so it might be up to 100m longer at each end.This creator will always return
PiecewiseTmcCoverages that containTMCLocationReferences, notTMCExitEntryLocationReferences.For details on how TMC works, see the Developer Guide.
Note that without passing in a valid
adjacencyProviderthis API only supports creating references withextent< 1. If noadjacencyProvideris given, the creator will create multiple location references, one reference for each location code on the path.Note that this method has the same behavior as the corresponding V2 static method.
-
olrLinear
Generates a creator forLinearLocationReferences.As a
LinearLocationReferencerefers to a path in the road network, you need to create this reference against a map. -
olrClosedLinear
public LocationReferenceCreator<ClosedLinearLocation,ClosedLinearLocationReference> olrClosedLinear()Generates a creator forClosedLinearLocationReferences.A
ClosedLinearLocationReferencerefers to a closed path in the road network and thus needs to be created against a map. -
olrPointAlongLine
Generates a creator forPointAlongLineLocationReferences.A
PointAlongLineLocationReferencerefers to a point on a road section and thus needs to be created against a map. -
olrPoiWithAccessPoint
public LocationReferenceCreator<PointOfInterest,POIWithAccessPointLocationReference> olrPoiWithAccessPoint()Generates a creator forPOIWithAccessPointLocationReferences.A
POIWithAccessPointLocationReferencerefers to an access point on a road section and thus needs to be created against a map. -
olrRectangle
Generates a creator forRectangleLocationReference.A rectangle location reference is based on rectangular shapes and is defined in terms of a pair of geopoints, defining north/south latitude limits, and east/west longitude limits.
This reference type is disconnected from the road network, and does not require a catalog to be created.
-
olrRectangle
public static <BB> LocationReferenceCreator<BB,RectangleLocationReference> olrRectangle(BoundingBoxAdapter<BB> adapter) Generates a creator forRectangleLocationReference.A rectangle location reference is based on rectangular shapes and is defined in terms of a pair of geopoints, defining north/south latitude limits, and east/west longitude limits.
This reference type is disconnected from the road network, and does not require a catalog to be created.
- Parameters:
adapter- Adapter to extract north/south latitudes and east/west longitudes from BB
-
olrRectangleFromHolder
public static <BB extends BoundingBoxHolder> LocationReferenceCreator<BB,RectangleLocationReference> olrRectangleFromHolder()Generates a creator forRectangleLocationReference.A rectangle location reference is based on rectangular shapes and is defined in terms of a pair of geopoints, defining north/south latitude limits, and east/west longitude limits.
This reference type is disconnected from the road network, and does not require a catalog to be created.
-
olrGeoCoordinate
public static LocationReferenceCreator<GeoCoordinateLocation,GeoCoordinateLocationReference> olrGeoCoordinate()Generates a creator forGeoCoordinateLocationReference.This creator converts WGS84 coordinates to OLR geocoordinates represented by integer values.
This reference type is disconnected from the road network, and does not require a catalog to be created.
-
olrGeoCoordinate
public static <GC> LocationReferenceCreator<GC,GeoCoordinateLocationReference> olrGeoCoordinate(GeoCoordinateAdapter<GC> adapter) Generates a creator forGeoCoordinateLocationReference.This creator converts WGS84 coordinates to OLR geocoordinates represented by integer values.
This reference type is disconnected from the road network, and does not require a catalog to be created.
-
olrGeoCoordinateFromHolder
public static <GC extends GeoCoordinateHolder> LocationReferenceCreator<GC,GeoCoordinateLocationReference> olrGeoCoordinateFromHolder()Generates a creator forGeoCoordinateLocationReference.This creator converts WGS84 coordinates to OLR geocoordinates represented by integer values.
This reference type is disconnected from the road network, and does not require a catalog to be created.
-
olrPolygon
Generates a creator forPolygonLocationReference.A polygon location is a non-intersecting shape defined by a sequence of geocoordinate pairs. It can be used to represent any complex area in the map, like a low emission zone, or an area where traffic is overloaded.
This reference type is disconnected from the road network, and does not require a catalog to be created.
-
olrPolygon
public static <LR,P> LocationReferenceCreator<LR,PolygonLocationReference> olrPolygon(LinearRingAdapter<LR, P> linearRingAdapter, GeoCoordinateAdapter<P> pointAdapter) Generates a creator forPolygonLocationReference.A polygon location is a non-intersecting shape defined by a sequence of geocoordinate pairs. It can be used to represent any complex area in the map, like a low emission zone, or an area where traffic is overloaded.
This reference type is disconnected from the road network, and does not require a catalog to be created.
- Parameters:
linearRingAdapter- Adapter to obtain points from a linear ringpointAdapter- Adapter to extract latitude and longitude for P
-
olrPolygonFromHolder
public static <LR extends LinearRingHolder<C>,C extends GeoCoordinateHolder> LocationReferenceCreator<LR,PolygonLocationReference> olrPolygonFromHolder()Generates a creator forPolygonLocationReference.A polygon location is a non-intersecting shape defined by a sequence of geocoordinate pairs. It can be used to represent any complex area in the map, like a low emission zone, or an area where traffic is overloaded.
This reference type is disconnected from the road network, and does not require a catalog to be created.
-
olrCircle
Generates a creator forCircleLocationReference.A circle location is given by a geo-location of the center of the circle and its radius.
Real-world examples include a Wi-Fi hotspot with its signal range, or the center and radius used with a proximity search.
This reference type is disconnected from the road network, and does not require a catalog to be created.
-
olrGrid
Generates a creator forGridLocationReference.Grid locations are defined in terms of a base rectangle location and a number of rows and columns. The base rectangle is multiplied to the north by the the number of rows and to the east by the number of columns.
Weather reports are a real-world example for this reference type. For instance, average rainfall could be defined for every cell of the grid.
This reference type is disconnected from the road network, and does not require a catalog to be created.
-
olr
Generates a creator forOpenLRLocationReferences fromReferencingLocations.This creator chooses the correct type of OpenLR reference depending on the actual subtype of
ReferencingLocationthat is being passed in.
-