Class PropertyMaps
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Provides factory methods for accessing properties from theadasattributes
layer of Optimized Map for Location Library.static final class
Provides factory methods for accessing properties from theadvancednavigationattributes
layer of Optimized Map for Location Library.static final class
Provides factory methods for accessing properties from thenavigationattributes
layer of Optimized Map for Location Library.static final class
Provides factory methods for accessing properties from theroadattributes
layer of Optimized Map for Location Library. -
Constructor Summary
ConstructorsConstructorDescriptionPropertyMaps
(OptimizedMapLayers optimizedMap) Creates aPropertyMaps
from an Optimized Map for Location Library. -
Method Summary
Modifier and TypeMethodDescriptionProvides factory methods for accessing properties from theadasattributes
layer of Optimized Map for Location Library.static <T> RangeBasedPropertyMap<Vertex,
T> advancedNavigationAttribute
(Catalog optimizedMap, String compiledLayerId, Catalog hereMapContent, CacheManager cacheManager, AttributeAccessor<com.here.schema.rib.v2.advanced_navigation_attributes_partition.AdvancedNavigationAttributesPartition, T> accessor) Deprecated.Provides factory methods for accessing properties from theadvancednavigationattributes
layer of Optimized Map for Location Library.Creates an accessor for the free-flow-speed of aVertex
.static RangeBasedPropertyMap<Vertex,
Integer> freeFlowSpeed
(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).freeFlowSpeed()
.static RangeBasedPropertyMap<Vertex,
Integer> freeFlowSpeed
(FreeFlowSpeedLayer freeFlowSpeedLayer) geometry()
Creates a map that returns the geometry (in the form ofLineString
) of aVertex
.static PropertyMap<Vertex,
LineStringHolder<GeoCoordinate>> geometry
(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).geometry()
.static PropertyMap<Vertex,
LineStringHolder<GeoCoordinate>> geometry
(GeometryLayer geometryLayer) Creates a map that, given aHereMapContentReference
, returns the correspondingVertex
.static PropertyMap<HereMapContentReference,
Vertex> hereMapContentReferenceToVertex
(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).hereMapContentReferenceToVertex()
.static PropertyMap<HereMapContentReference,
Vertex> hereMapContentReferenceToVertex
(MappingLayer mappingLayer) length()
Creates a map that returns the length of aVertex
.static PropertyMap<Vertex,
Double> length
(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).length()
.static PropertyMap<Vertex,
Double> length
(LengthLayer lengthLayer) static <T> RangeBasedPropertyMap<Vertex,
T> navigationAttribute
(Catalog optimizedMap, String compiledLayerId, Catalog hereMapContent, CacheManager cacheManager, AttributeAccessor<com.here.schema.rib.v2.navigation_attributes_partition.NavigationAttributesPartition, T> accessor) Deprecated.Prefernew PropertyMaps(optimizedMap).navigationAttributes()
.Provides factory methods for accessing properties from thenavigationattributes
layer of Optimized Map for Location Library.static <P,
T> PropertyMap<Vertex, List<RangeBasedProperty<T>>> overlappingRangeBasedProperty
(Catalog optimizedMap, String compiledLayerId, CacheManager cacheManager, TileLoader<P> tileLoader, PartitionResolver partitionResolver, AttributeAccessor<P, T> accessor) Deprecated.This functionality will be removed.static <P,
T> RangeBasedPropertyMap<Vertex, T> rangeBasedProperty
(Catalog optimizedMap, String compiledLayerId, CacheManager cacheManager, TileLoader<P> tileLoader, PartitionResolver partitionResolver, AttributeAccessor<P, T> accessor) Deprecated.This functionality will be removed.roadAccess
(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).roadAccess()
.static RangeBasedPropertyMap<Vertex,
Boolean> roadAccess
(Catalog optimizedMap, DataLoaderProvider cacheManager, RoadAccessType accessType) Deprecated.Prefernew PropertyMaps(optimizedMap).roadAccess(accessType)
.roadAccess
(RoadAccessType accessType) Creates aRangeBasedPropertyMap
that checks whether aVertex
is accessible to any type of traffic represented inaccessType
.roadAccess
(RoadAccessLayer roadAccessLayer) static RangeBasedPropertyMap<Vertex,
Boolean> roadAccess
(RoadAccessLayer roadAccessLayer, RoadAccessType accessType) static <T> RangeBasedPropertyMap<Vertex,
T> roadAttribute
(Catalog optimizedMap, String compiledLayerId, Catalog hereMapContent, CacheManager cacheManager, AttributeAccessor<com.here.schema.rib.v2.road_attributes_partition.RoadAttributesPartition, T> accessor) Deprecated.Prefernew PropertyMaps(optimizedMap).roadAttributes()
.Provides factory methods for accessing properties from theroadattributes
layer of Optimized Map for Location Library.routingRoadAccess
(RoadAccessType accessType) Creates aRangeBasedPropertyMap
that checks whether aVertex
is accessible to any type of traffic represented inaccessType
.Creates aPropertyMap
that retrieves theAccessRestrictionType
s that apply to a turn, a transition between twoVertices
represented by anEdge
.static PropertyMap<Edge,
AccessRestrictionType> turnRestrictions
(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).turnRestrictions()
.static PropertyMap<Edge,
Boolean> turnRestrictions
(Catalog optimizedMap, DataLoaderProvider cacheManager, AccessRestrictionType accessRestriction) Deprecated.Prefernew PropertyMaps(optimizedMap).turnRestrictions(accessRestriction)
.turnRestrictions
(AccessRestrictionType accessRestriction) Creates aPropertyMap
that checks whether a turn, a transition between twoVertices
represented by anEdge
, is restricted for any type of traffic represented inaccessRestriction
.static PropertyMap<Edge,
AccessRestrictionType> turnRestrictions
(RestrictedManoeuvreLayer restrictedManoeuvreLayer) static PropertyMap<Edge,
Boolean> turnRestrictions
(RestrictedManoeuvreLayer restrictedManoeuvreLayer, AccessRestrictionType accessRestriction) Creates a map that, given aVertex
, returns the correspondingHereMapContentReference
.static PropertyMap<Vertex,
HereMapContentReference> vertexToHereMapContentReference
(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).vertexToHereMapContentReference()
.static PropertyMap<Vertex,
HereMapContentReference> vertexToHereMapContentReference
(MappingLayer mappingLayer)
-
Constructor Details
-
PropertyMaps
Creates aPropertyMaps
from an Optimized Map for Location Library.
-
-
Method Details
-
hereMapContentReferenceToVertex
Creates a map that, given aHereMapContentReference
, returns the correspondingVertex
. -
vertexToHereMapContentReference
Creates a map that, given aVertex
, returns the correspondingHereMapContentReference
. It basically does the opposite mapping as done by the map returned byhereMapContentReferenceToVertex()
. -
geometry
Creates a map that returns the geometry (in the form ofLineString
) of aVertex
. -
length
Creates a map that returns the length of aVertex
. -
turnRestrictions
Creates aPropertyMap
that retrieves theAccessRestrictionType
s that apply to a turn, a transition between twoVertices
represented by anEdge
.Note that, in this context, the word turn can mean going straight.
-
turnRestrictions
Creates aPropertyMap
that checks whether a turn, a transition between twoVertices
represented by anEdge
, is restricted for any type of traffic represented inaccessRestriction
.Note that, in this context, the word turn can mean going straight.
-
roadAccess
Creates aRangeBasedPropertyMap
that retrieves theRoadAccessType
of aVertex
.If a
Vertex
is inaccessible, theRangeBasedPropertyMap
returnsList(
.RangeBasedProperty
(0.0, 1.0,RoadAccess.None
))The attribute is "optimistically" derived from four HERE Map Content attributes:
- RoadAttributes.accessible_by
- NavigationAttributes.travel_direction
- NavigationAttributes.access_permission
- NavigationAttributes.access_restriction
-
roadAccess
Creates aRangeBasedPropertyMap
that checks whether aVertex
is accessible to any type of traffic represented inaccessType
.If a
Vertex
is inaccessible, theRangeBasedPropertyMap
returnsList(
.RangeBasedProperty
(0.0, 1.0, false))The attribute is "optimistically" derived from four HERE Map Content attributes:
- RoadAttributes.accessible_by
- NavigationAttributes.travel_direction
- NavigationAttributes.access_permission
- NavigationAttributes.access_restriction
-
routingRoadAccess
Creates aRangeBasedPropertyMap
that retrieves theRoadAccessType
of aVertex
.If a
Vertex
is inaccessible, theRangeBasedPropertyMap
returnsList(
.RangeBasedProperty
(0.0, 1.0,RoadAccess.None
))The attribute is "optimistically" derived from four HERE Map Content attributes:
- RoadAttributes.accessible_by
- NavigationAttributes.travel_direction
- NavigationAttributes.access_permission
- NavigationAttributes.access_restriction
- NavigationAttributes.construction_status
"Optimistically" means that the road is considered open if it is traversable at some point in time.
The difference between this method and
roadAccess()
is that underlying layer here excludes under construction roads. -
routingRoadAccess
Creates aRangeBasedPropertyMap
that checks whether aVertex
is accessible to any type of traffic represented inaccessType
.If a
Vertex
is inaccessible, theRangeBasedPropertyMap
returnsList(
.RangeBasedProperty
(0.0, 1.0, false))The attribute is "optimistically" derived from four HERE Map Content attributes:
- RoadAttributes.accessible_by
- NavigationAttributes.travel_direction
- NavigationAttributes.access_permission
- NavigationAttributes.access_restriction
- NavigationAttributes.construction_status
"Optimistically" means that the road is considered open if it is traversable at some point in time.
The difference between this method and
roadAccess(RoadAccessType)
is that underlying layer here excludes under construction roads. -
freeFlowSpeed
Creates an accessor for the free-flow-speed of aVertex
.The attribute is returned in km/h.
-
roadAttributes
Provides factory methods for accessing properties from theroadattributes
layer of Optimized Map for Location Library. -
adasAttributes
Provides factory methods for accessing properties from theadasattributes
layer of Optimized Map for Location Library. -
hereMapContentReferenceToVertex
@Deprecated public static PropertyMap<HereMapContentReference,Vertex> hereMapContentReferenceToVertex(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).hereMapContentReferenceToVertex()
.Creates a map that, given aHereMapContentReference
, returns the correspondingVertex
. -
vertexToHereMapContentReference
@Deprecated public static PropertyMap<Vertex,HereMapContentReference> vertexToHereMapContentReference(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).vertexToHereMapContentReference()
.Creates a map that, given aVertex
, returns the correspondingHereMapContentReference
. It basically does the opposite mapping as done by the map returned byhereMapContentReferenceToVertex(com.here.platform.location.dataloader.core.Catalog, com.here.platform.location.dataloader.core.DataLoaderProvider)
. -
geometry
@Deprecated public static PropertyMap<Vertex,LineStringHolder<GeoCoordinate>> geometry(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).geometry()
.Creates a map that returns the geometry (in the form ofLineString
) of aVertex
. -
length
@Deprecated public static PropertyMap<Vertex,Double> length(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).length()
.Creates a map that returns the length of aVertex
. -
turnRestrictions
@Deprecated public static PropertyMap<Edge,AccessRestrictionType> turnRestrictions(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).turnRestrictions()
.Creates aPropertyMap
that retrieves theAccessRestrictionType
s that apply to a turn, a transition between twoVertices
represented by anEdge
.Note that, in this context, the word turn can mean going straight.
-
turnRestrictions
@Deprecated public static PropertyMap<Edge,Boolean> turnRestrictions(Catalog optimizedMap, DataLoaderProvider cacheManager, AccessRestrictionType accessRestriction) Deprecated.Prefernew PropertyMaps(optimizedMap).turnRestrictions(accessRestriction)
.Creates aPropertyMap
that checks whether a turn, a transition between twoVertices
represented by anEdge
, is restricted for any type of traffic represented inaccessRestriction
.Note that, in this context, the word turn can mean going straight.
-
roadAccess
@Deprecated public static RangeBasedPropertyMap<Vertex,RoadAccessType> roadAccess(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).roadAccess()
.Creates aRangeBasedPropertyMap
that retrieves theRoadAccessType
of aVertex
.If a
Vertex
is inaccessible, theRangeBasedPropertyMap
returnsList(
.RangeBasedProperty
(0.0, 1.0,RoadAccess.None
))The attribute is "optimistically" derived from four HERE Map Content attributes:
- RoadAttributes.accessible_by
- NavigationAttributes.travel_direction
- NavigationAttributes.access_permission
- NavigationAttributes.access_restriction
-
roadAccess
@Deprecated public static RangeBasedPropertyMap<Vertex,Boolean> roadAccess(Catalog optimizedMap, DataLoaderProvider cacheManager, RoadAccessType accessType) Deprecated.Prefernew PropertyMaps(optimizedMap).roadAccess(accessType)
.Creates aRangeBasedPropertyMap
that checks whether aVertex
is accessible to any type of traffic represented inaccessType
.If a
Vertex
is inaccessible, theRangeBasedPropertyMap
returnsList(
.RangeBasedProperty
(0.0, 1.0, false))The attribute is "optimistically" derived from four HERE Map Content attributes:
- RoadAttributes.accessible_by
- NavigationAttributes.travel_direction
- NavigationAttributes.access_permission
- NavigationAttributes.access_restriction
-
freeFlowSpeed
@Deprecated public static RangeBasedPropertyMap<Vertex,Integer> freeFlowSpeed(Catalog optimizedMap, DataLoaderProvider cacheManager) Deprecated.Prefernew PropertyMaps(optimizedMap).freeFlowSpeed()
.Creates an accessor for the free-flow-speed of aVertex
.The attribute is returned in km/h.
-
rangeBasedProperty
@Deprecated public static <P,T> RangeBasedPropertyMap<Vertex,T> rangeBasedProperty(Catalog optimizedMap, String compiledLayerId, CacheManager cacheManager, TileLoader<P> tileLoader, PartitionResolver partitionResolver, AttributeAccessor<P, T> accessor) Deprecated.This functionality will be removed.Creates aRangeBasedPropertyMap
that compiles an attribute contained in a HERE Map Content layer lazily and on the fly.Note: This method does not support attributes with overlapping ranges because, in that case, it is not possible to uniquely determine which attribute value applies at a specific point on a road.
For convenience,
PropertyMaps
contains accessors to several HERE Map Content attributes that call this method.A HERE Map Content layer may contain different types of attributes. For example, the
HereMapContentLayers.AdvancedNavigationAttributes()
layer contains several attribute types, one of which represents speed limits. The returnedRangeBasedPropertyMap
contains the values for only one attribute type. TheAttributeAccessor
specifies how to retrieve the values for a given attribute type.For instance, the following code snippet shows how to retrieve speed limits:
final RangeBasedPropertyMap<Vertex, Integer> speedLimits = PropertyMaps.rangeBasedProperty( optimizedMap, "speed-limit", cacheManager, HereMapContentLayers.AdvancedNavigationAttributes().tileLoader(hereMapContent, cacheManager), HereMapContentLayers.AdvancedNavigationAttributes().partitionResolver(optimizedMap, cacheManager), AttributeAccessors.forHereMapContentSegmentAnchor( AdvancedNavigationAttributesPartition::speedLimit, SpeedLimitAttribute::value));
The compilation of one attribute tile of a HERE Map Content layer is an expensive operation. The compilation of all attributes contained in a tile takes place when, for the first time, a running app retrieves the attribute for a vertex that belongs to this tile. If, later, the running app retrieves attributes for other vertices that belong to the same tile, these operations will be fast because the compilation of such attributes already took place.
- Type Parameters:
P
- The input data type containing HERE Map Content attributesT
- The type of the compiled attribute- Parameters:
compiledLayerId
- a unique layer id, identifying theAttributeAccessor
used for caching purposes.tileLoader
- The loader for the tiles containing the desired datapartitionResolver
- The partition resolver from an Optimized Map tile to all the input tiles, provided by thetileLoader
, that are needed to compile the specified attributeaccessor
- AnAttributeAccessor
that extracts the attribute contained in the given HERE Map Content layer, or in the layer that follows the HERE Map Content format- See Also:
-
overlappingRangeBasedProperty
@Deprecated public static <P,T> PropertyMap<Vertex,List<RangeBasedProperty<T>>> overlappingRangeBasedProperty(Catalog optimizedMap, String compiledLayerId, CacheManager cacheManager, TileLoader<P> tileLoader, PartitionResolver partitionResolver, AttributeAccessor<P, T> accessor) Deprecated.This functionality will be removed.Creates aPropertyMap
that compiles an attribute contained in a HERE Map Content layer lazily and on the fly.A HERE Map Content layer may contain different types of attributes. For example, the
HereMapContentLayers.AdvancedNavigationAttributes()
layer contains several attribute types, one of which represents speed limits. The returnedPropertyMap
contains the values for only one attribute type. TheAttributeAccessor
specifies how to retrieve the values for a given attribute type.The compilation of one attribute tile of a HERE Map Content layer is an expensive operation. The compilation of all attributes contained in a tile takes place when, for the first time, a running app retrieves the attribute for a vertex that belongs to this tile. If, later, the running app retrieves attributes for other vertices that belong to the same tile, these operations will be fast because the compilation of such attributes already took place.
- Type Parameters:
P
- The input data type containing HERE Map Content attributesT
- The type of the compiled attribute- Parameters:
compiledLayerId
- a unique layer id, identifying theAttributeAccessor
used for caching purposes.tileLoader
- The loader for the tiles containing the desired datapartitionResolver
- The partition resolver from an Optimized Map tile to all the input tiles, provided by thetileLoader
, that are needed to compile the specified attributeaccessor
- AnAttributeAccessor
that extracts the attribute contained in the given HERE Map Content layer, or in the layer that follows the HERE Map Content format
-
roadAttribute
@Deprecated public static <T> RangeBasedPropertyMap<Vertex,T> roadAttribute(Catalog optimizedMap, String compiledLayerId, Catalog hereMapContent, CacheManager cacheManager, AttributeAccessor<com.here.schema.rib.v2.road_attributes_partition.RoadAttributesPartition, T> accessor) Deprecated.Prefernew PropertyMaps(optimizedMap).roadAttributes()
.Creates aRangeBasedPropertyMap
that compiles one of the HERE Map ContentHereMapContentLayers.RoadAttributes()
lazily and on the fly.Note: This method does not support attributes with overlapping ranges because, in that case, it is not possible to uniquely determine which attribute value applies at a specific point on a road.
- Type Parameters:
T
- The type of the compiled attribute- Parameters:
compiledLayerId
- a unique layer id, identifying theAttributeAccessor
used for caching purposes.accessor
- anAttributeAccessor
that extracts the wanted attribute contained in theroad-attributes
layer of HERE Map Content- See Also:
-
hereMapContentReferenceToVertex
public static PropertyMap<HereMapContentReference,Vertex> hereMapContentReferenceToVertex(MappingLayer mappingLayer) -
vertexToHereMapContentReference
public static PropertyMap<Vertex,HereMapContentReference> vertexToHereMapContentReference(MappingLayer mappingLayer) -
geometry
public static PropertyMap<Vertex,LineStringHolder<GeoCoordinate>> geometry(GeometryLayer geometryLayer) -
length
-
turnRestrictions
public static PropertyMap<Edge,AccessRestrictionType> turnRestrictions(RestrictedManoeuvreLayer restrictedManoeuvreLayer) -
turnRestrictions
public static PropertyMap<Edge,Boolean> turnRestrictions(RestrictedManoeuvreLayer restrictedManoeuvreLayer, AccessRestrictionType accessRestriction) -
roadAccess
public static RangeBasedPropertyMap<Vertex,RoadAccessType> roadAccess(RoadAccessLayer roadAccessLayer) -
roadAccess
public static RangeBasedPropertyMap<Vertex,Boolean> roadAccess(RoadAccessLayer roadAccessLayer, RoadAccessType accessType) -
freeFlowSpeed
public static RangeBasedPropertyMap<Vertex,Integer> freeFlowSpeed(FreeFlowSpeedLayer freeFlowSpeedLayer)
-
new PropertyMaps(optimizedMap).advancedNavigationAttributes()
.