Class LocationReferenceResolvers
LocationReferenceResolvers
to resolve different location reference types into Location Library data model specific
representations.-
Constructor Summary
ConstructorsConstructorDescriptionLocationReferenceResolvers(OptimizedMapLayers optimizedMapLayers) LocationReferenceResolvers(OptimizedMapLayers optimizedMapLayers, TmcAdjacencyProvider adjacencyProvider) -
Method Summary
Modifier and TypeMethodDescriptionCreates a resolver forExtendedTMCLocationReferences.olr()Creates a resolver that resolvesOpenLRLocationReferences toReferencingLocations.Creates a resolver forCircleLocationReferences.Creates a resolver forClosedLinearLocationReferences.Creates a resolver forGeoCoordinateLocationReference.olrGrid()Creates a resolver forGridLocationReferences.Creates a resolver forLinearLocationReferences.Creates a resolver forPointAlongLineLocationReferences.Creates a resolver forPOIWithAccessPointLocationReferences.Creates a resolver forPolygonLocationReferences.Creates a resolver forRectangleLocationReferences.tmc()Creates a resolver for simpleTMCLocationReferences.
-
Constructor Details
-
LocationReferenceResolvers
-
LocationReferenceResolvers
public LocationReferenceResolvers(OptimizedMapLayers optimizedMapLayers, TmcAdjacencyProvider adjacencyProvider) - Parameters:
adjacencyProvider- Provides information about TMC location adjacency to support creation of references withextent> 1.
-
-
Method Details
-
tmc
Creates a resolver for simpleTMCLocationReferences.TMC resolvers return a
BidirectionalLinearLocationbecause TMC location references can, at the same time, refer to the positive and negative parts of the location.For details on how TMC works, see the Developer Guide.
Note that without passing in a valid
adjacencyProviderthis API only supports resolving references withextent<= 1. To get support for a longerextentanadjacencyProviderneeds to be passed in.Note that this API only supports decoding of references with a valid extendedCountryCode.
-
extendedTmc
public LocationReferenceResolver<ExtendedTMCLocationReference,BidirectionalLinearLocation> extendedTmc()Creates a resolver forExtendedTMCLocationReferences.ExtendedTMCLocationReferencehave two fields with location reference:tmcLocationortmcExitEntryLocation.tmcLocation. Per the standard, only one of these two should be defined. This resolver uses thetmcLocationfield by default, and falls back to the other in case the former is not present.TMC resolvers return a
BidirectionalLinearLocationbecause TMC location references can, at the same time, refer to the positive and negative parts of the location.For details on how TMC works, see the Developer Guide.
Note that without passing in a valid
adjacencyProviderthis API only supports resolving references withextent<= 1. To get support for a longerextentanadjacencyProviderneeds to be passed in.Note that this API only supports decoding of references with a valid extendedCountryCode.
Note This method has the same behavior as the V2 method of the companion object.
-
olrLinear
Creates a resolver forLinearLocationReferences.A
LinearLocationReferencerefers to a path in the road network and thus needs to be resolved against a map. If the reference cannot be resolved anOlrResolverExceptionis thrown. Specific cases where this can happen are described in the documentation of the exception class. -
olrPointAlongLine
Creates a resolver forPointAlongLineLocationReferences.A
PointAlongLineLocationReferencerefers to a point on a road section and thus needs to be resolved against a map. If the reference cannot be resolved anOlrResolverExceptionis thrown. Specific cases where this can happen are described in the documentation of the exception class. -
olrClosedLinear
public LocationReferenceResolver<ClosedLinearLocationReference,ClosedLinearLocation> olrClosedLinear()Creates a resolver forClosedLinearLocationReferences.A
ClosedLinearLocationReferencerefers to a closed path in the road network and thus needs to be resolved against a map. If the reference cannot be resolved anOlrResolverExceptionis thrown. Specific cases where this can happen are described in the documentation of the exception class. -
olrPoiWithAccessPoint
public LocationReferenceResolver<POIWithAccessPointLocationReference,PointOfInterest> olrPoiWithAccessPoint()Creates a resolver forPOIWithAccessPointLocationReferences.A
POIWithAccessPointLocationReferencerefers to an access point on a road section and thus needs to be resolved against a map. If the reference cannot be resolved anOlrResolverExceptionis thrown. Specific cases where this can happen are described in the documentation of the exception class. -
olrRectangle
public static LocationReferenceResolver<RectangleLocationReference,RectangleLocation> olrRectangle()Creates a resolver forRectangleLocationReferences.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 resolved.
-
olrGeoCoordinate
public static LocationReferenceResolver<GeoCoordinateLocationReference,GeoCoordinateLocation> olrGeoCoordinate()Creates a resolver forGeoCoordinateLocationReference.OLR's geocoordinates are represented by integer values. This resolver converts them back to WGS84 coordinates.
This reference type is disconnected from the road network, and does not require a catalog to be resolved.
-
olrPolygon
Creates a resolver forPolygonLocationReferences.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 resolved.
-
olrCircle
Creates a resolver forCircleLocationReferences.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 resolved.
-
olrGrid
Creates a resolver forGridLocationReferences.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 resolved.
GridLocationprovides methods to retrieve all the bounding boxes that compose the grid. -
olr
Creates a resolver that resolvesOpenLRLocationReferences toReferencingLocations.This resolver chooses the correct type of
ReferencingLocationbased on the type the OpenLR reference that is being passed in. For the following reference types anOlrResolverExceptioncan be thrown if the reference cannot be resolved:LinearLocationReferencePointAlongLineLocationReferenceClosedLinearLocationReferencePOIWithAccessPointLocationReference
Specific cases where this can happen are described in the documentation of the exception class.
-