Class TmcLocationReferenceCreators
LocationReferenceCreators factories to create Tmc location reference types from
Location Library data model specific representations.-
Constructor Summary
ConstructorsConstructorDescriptionTmcLocationReferenceCreators(TmcLayers tmcLayers) TmcLocationReferenceCreators(TmcLayers tmcLayers, TmcAdjacencyProvider adjacencyProvider) -
Method Summary
Modifier and TypeMethodDescriptionGenerates a creator forExtendedTMCLocationReferences.extendedTmc(PropertyMap<Vertex, Double> length, DirectedGraph<Vertex, Edge> graph, PropertyMap<TrafficMessageChannelCode, Optional<LinearLocation>> tmcCodesToLinearLocations, RangeBasedPropertyMap<Vertex, Set<TrafficMessageChannelCode>> trafficMessageChannelCodes, Optional<TmcAdjacencyProvider> adjacencyProvider) Generates a creator forExtendedTMCLocationReferences.Generates a creator forPiecewiseTmcCoverage.piecewiseExtendedTmc(PropertyMap<Vertex, Double> length, DirectedGraph<Vertex, Edge> graph, PropertyMap<TrafficMessageChannelCode, Optional<LinearLocation>> tmcCodesToLinearLocations, RangeBasedPropertyMap<Vertex, Set<TrafficMessageChannelCode>> trafficMessageChannelCodes, Optional<TmcAdjacencyProvider> adjacencyProvider) Generates a creator forPiecewiseTmcCoverage.tmc()Generates a creator for simpleTMCLocationReferences.tmc(PropertyMap<Vertex, Double> length, DirectedGraph<Vertex, Edge> graph, PropertyMap<TrafficMessageChannelCode, Optional<LinearLocation>> tmcCodesToLinearLocations, RangeBasedPropertyMap<Vertex, Set<TrafficMessageChannelCode>> trafficMessageChannelCodes, Optional<TmcAdjacencyProvider> adjacencyProvider) Generates a creator for simpleTMCLocationReferences.
-
Constructor Details
-
TmcLocationReferenceCreators
-
TmcLocationReferenceCreators
-
-
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
public static LocationReferenceCreator<LinearLocation,TMCLocationReference> tmc(PropertyMap<Vertex, Double> length, DirectedGraph<Vertex, Edge> graph, PropertyMap<TrafficMessageChannelCode, Optional<LinearLocation>> tmcCodesToLinearLocations, RangeBasedPropertyMap<Vertex, Set<TrafficMessageChannelCode>> trafficMessageChannelCodes, Optional<TmcAdjacencyProvider> adjacencyProvider) 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
public static LocationReferenceCreator<LinearLocation,ExtendedTMCLocationReference> extendedTmc(PropertyMap<Vertex, Double> length, DirectedGraph<Vertex, Edge> graph, PropertyMap<TrafficMessageChannelCode, Optional<LinearLocation>> tmcCodesToLinearLocations, RangeBasedPropertyMap<Vertex, Set<TrafficMessageChannelCode>> trafficMessageChannelCodes, Optional<TmcAdjacencyProvider> adjacencyProvider) 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
public static LocationReferenceCreator<LinearLocation,PiecewiseTmcCoverage> piecewiseExtendedTmc(PropertyMap<Vertex, Double> length, DirectedGraph<Vertex, Edge> graph, PropertyMap<TrafficMessageChannelCode, Optional<LinearLocation>> tmcCodesToLinearLocations, RangeBasedPropertyMap<Vertex, Set<TrafficMessageChannelCode>> trafficMessageChannelCodes, Optional<TmcAdjacencyProvider> adjacencyProvider) 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.
-