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.extendedTmcV2(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.extendedTmcV2(Catalog optimizedMap, DataLoaderProvider cacheManager, TmcAdjacencyProvider adjacencyProvider) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers, adjacencyProvider).extendedTmc().olr()Generates a creator forOpenLRLocationReferences fromReferencingLocations.olr(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).olr().Generates a creator forCircleLocationReference.Generates a creator forClosedLinearLocationReferences.olrClosedLinear(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).olrClosedLinear().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.olrLinear(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).olrLinear().Generates a creator forPointAlongLineLocationReferences.olrPointAlongLine(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).olrPointAlongLine().Generates a creator forPOIWithAccessPointLocationReferences.olrPoiWithAccessPoint(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).olrPoiWithAccessPoint().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.piecewiseExtendedTmcV2(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).piecewiseExtendedTmc().piecewiseExtendedTmcV2(Catalog optimizedMap, DataLoaderProvider cacheManager, TmcAdjacencyProvider adjacencyProvider) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers, adjacencyProvider).piecewiseExtendedTmc().tmc()Generates a creator for simpleTMCLocationReferences.tmc(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).tmc().tmc(Catalog optimizedMap, DataLoaderProvider cacheManager, TmcAdjacencyProvider adjacencyProvider) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers, adjacencyProvider).tmc().
-
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.
-
tmc
@Deprecated public static LocationReferenceCreator<LinearLocation,TMCLocationReference> tmc(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).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 this API only supports creating references with
extent<= 1. The creator will fail if with aNoLinearAvailableExceptionif the given location is not fully covered by the same location code.- Parameters:
optimizedMap- An Optimized Map for Location Library instance
-
tmc
@Deprecated public static LocationReferenceCreator<LinearLocation,TMCLocationReference> tmc(Catalog optimizedMap, DataLoaderProvider cacheManager, TmcAdjacencyProvider adjacencyProvider) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers, adjacencyProvider).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.
- Parameters:
optimizedMap- An Optimized Map for Location Library instanceadjacencyProvider- Provides information about TMC location adjacency to support creation of references withextent> 1.
-
extendedTmcV2
@Deprecated public static LocationReferenceCreator<LinearLocation,ExtendedTMCLocationReference> extendedTmcV2(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).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 API only supports creating references with
extent<= 1. The creator will fail if with aNoLinearAvailableExceptionif the given location is not fully covered by the same location code.- Parameters:
optimizedMap- An Optimized Map for Location Library instance
-
extendedTmcV2
@Deprecated public static LocationReferenceCreator<LinearLocation,ExtendedTMCLocationReference> extendedTmcV2(Catalog optimizedMap, DataLoaderProvider cacheManager, TmcAdjacencyProvider adjacencyProvider) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers, adjacencyProvider).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.
- Parameters:
optimizedMap- An Optimized Map for Location Library instanceadjacencyProvider- Provides information about TMC location adjacency to support creation of references withextent> 1.
-
piecewiseExtendedTmcV2
@Deprecated public static LocationReferenceCreator<LinearLocation,PiecewiseTmcCoverage> piecewiseExtendedTmcV2(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).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 this experimental API only supports creating references with
extent<= 1. For each location code, the creator will create multiple location references.- Parameters:
optimizedMap- An Optimized Map for Location Library instance
-
piecewiseExtendedTmcV2
@Deprecated public static LocationReferenceCreator<LinearLocation,PiecewiseTmcCoverage> piecewiseExtendedTmcV2(Catalog optimizedMap, DataLoaderProvider cacheManager, TmcAdjacencyProvider adjacencyProvider) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers, adjacencyProvider).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.
- Parameters:
optimizedMap- An Optimized Map for Location Library instanceadjacencyProvider- Provides information about TMC location adjacency to support creation of references withextent> 1.
-
olrLinear
Generates a creator forLinearLocationReferences.As a
LinearLocationReferencerefers to a path in the road network, you need to create this reference against a map. -
olrLinear
@Deprecated public static LocationReferenceCreator<LinearLocation,LinearLocationReference> olrLinear(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).olrLinear().Generates a creator forLinearLocationReferences.As a
LinearLocationReferencerefers to a path in the road network, you need to create this reference against a map.- Parameters:
optimizedMap- An Optimized Map for Location Library instance.
-
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. -
olrClosedLinear
@Deprecated public static LocationReferenceCreator<ClosedLinearLocation,ClosedLinearLocationReference> olrClosedLinear(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).olrClosedLinear().Generates a creator forClosedLinearLocationReferences.A
ClosedLinearLocationReferencerefers to a closed path in the road network and thus needs to be created against a map.- Parameters:
optimizedMap- An Optimized Map for Location Library instance.
-
olrPointAlongLine
Generates a creator forPointAlongLineLocationReferences.A
PointAlongLineLocationReferencerefers to a point on a road section and thus needs to be created against a map. -
olrPointAlongLine
@Deprecated public static LocationReferenceCreator<AccessPoint,PointAlongLineLocationReference> olrPointAlongLine(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).olrPointAlongLine().Generates a creator forPointAlongLineLocationReferences.A
PointAlongLineLocationReferencerefers to a point on a road section and thus needs to be created against a map.- Parameters:
optimizedMap- An Optimized Map for Location Library instance.
-
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. -
olrPoiWithAccessPoint
@Deprecated public static LocationReferenceCreator<PointOfInterest,POIWithAccessPointLocationReference> olrPoiWithAccessPoint(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).olrPoiWithAccessPoint().Generates a creator forPOIWithAccessPointLocationReferences.A
POIWithAccessPointLocationReferencerefers to an access point on a road section and thus needs to be created against a map.- Parameters:
optimizedMap- An Optimized Map for Location Library instance.
-
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. -
olr
@Deprecated public static LocationReferenceCreator<ReferencingLocation,OpenLRLocationReference> olr(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew LocationReferenceCreators(optimizedMapLayers).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.- Parameters:
optimizedMap- An Optimized Map for Location Library instance
-
new LocationReferenceCreators(optimizedMapLayers).extendedTmc().