Class PropertyMaps
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classProvides factory methods for accessing properties from theadasattributeslayer of Optimized Map for Location Library.static final classDeprecated.static final classDeprecated.UseTopologyAttributes.static final classDeprecated.UseTopologyAttributes.static final classProvides factory methods for accessing properties from thetopologyattributeslayer of Optimized Map for Location Library. -
Constructor Summary
ConstructorsConstructorDescriptionPropertyMaps(OptimizedMapLayers optimizedMap) Creates aPropertyMapsfrom an Optimized Map for Location Library. -
Method Summary
Modifier and TypeMethodDescriptionProvides factory methods for accessing properties from theadasattributeslayer 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.Prefernew PropertyMaps(optimizedMap).advancedNavigationAttributes().Deprecated.UsetopologyAttributes().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().Deprecated.UsetopologyAttributes().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 aRangeBasedPropertyMapthat checks whether aVertexis 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().Deprecated.UsetopologyAttributes().routingRoadAccess(RoadAccessType accessType) Creates aRangeBasedPropertyMapthat checks whether aVertexis accessible to any type of traffic represented inaccessType.Provides factory methods for accessing properties from thetopologyattributeslayer of Optimized Map for Location Library.Creates aPropertyMapthat retrieves theAccessRestrictionTypes that apply to a turn, a transition between twoVerticesrepresented 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 aPropertyMapthat checks whether a turn, a transition between twoVerticesrepresented 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 aPropertyMapsfrom 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 aPropertyMapthat retrieves theAccessRestrictionTypes that apply to a turn, a transition between twoVerticesrepresented by anEdge.Note that, in this context, the word turn can mean going straight.
-
turnRestrictions
Creates aPropertyMapthat checks whether a turn, a transition between twoVerticesrepresented 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 aRangeBasedPropertyMapthat retrieves theRoadAccessTypeof aVertex.If a
Vertexis inaccessible, theRangeBasedPropertyMapreturnsList(.RangeBasedProperty(0.0, 1.0,RoadAccess.None))The attribute is "optimistically" derived from four HERE Map Content attributes:
- TopologyAttributes.accessible_by
- TopologyAttributes.travel_direction
- TopologyAttributes.access_permission
- TopologyAttributes.access_restriction
-
roadAccess
Creates aRangeBasedPropertyMapthat checks whether aVertexis accessible to any type of traffic represented inaccessType.If a
Vertexis inaccessible, theRangeBasedPropertyMapreturnsList(.RangeBasedProperty(0.0, 1.0, false))The attribute is "optimistically" derived from four HERE Map Content attributes:
- TopologyAttributes.accessible_by
- TopologyAttributes.travel_direction
- TopologyAttributes.access_permission
- TopologyAttributes.access_restriction
-
routingRoadAccess
Creates aRangeBasedPropertyMapthat retrieves theRoadAccessTypeof aVertex.If a
Vertexis inaccessible, theRangeBasedPropertyMapreturnsList(.RangeBasedProperty(0.0, 1.0,RoadAccess.None))The attribute is "optimistically" derived from four HERE Map Content attributes:
- TopologyAttributes.accessible_by
- TopologyAttributes.travel_direction
- TopologyAttributes.access_permission
- TopologyAttributes.access_restriction
- TopologyAttributes.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 aRangeBasedPropertyMapthat checks whether aVertexis accessible to any type of traffic represented inaccessType.If a
Vertexis inaccessible, theRangeBasedPropertyMapreturnsList(.RangeBasedProperty(0.0, 1.0, false))The attribute is "optimistically" derived from four HERE Map Content attributes:
- TopologyAttributes.accessible_by
- TopologyAttributes.travel_direction
- TopologyAttributes.access_permission
- TopologyAttributes.access_restriction
- TopologyAttributes.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
Deprecated.UsetopologyAttributes().Provides factory methods for accessing properties from theroadattributeslayer of Optimized Map for Location Library. -
topologyAttributes
Provides factory methods for accessing properties from thetopologyattributeslayer of Optimized Map for Location Library. -
adasAttributes
Provides factory methods for accessing properties from theadasattributeslayer 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 aPropertyMapthat retrieves theAccessRestrictionTypes that apply to a turn, a transition between twoVerticesrepresented 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 aPropertyMapthat checks whether a turn, a transition between twoVerticesrepresented 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 aRangeBasedPropertyMapthat retrieves theRoadAccessTypeof aVertex.If a
Vertexis inaccessible, theRangeBasedPropertyMapreturnsList(.RangeBasedProperty(0.0, 1.0,RoadAccess.None))The attribute is "optimistically" derived from four HERE Map Content attributes:
- TopologyAttributes.accessible_by
- TopologyAttributes.travel_direction
- TopologyAttributes.access_permission
- TopologyAttributes.access_restriction
-
roadAccess
@Deprecated public static RangeBasedPropertyMap<Vertex,Boolean> roadAccess(Catalog optimizedMap, DataLoaderProvider cacheManager, RoadAccessType accessType) Deprecated.Prefernew PropertyMaps(optimizedMap).roadAccess(accessType).Creates aRangeBasedPropertyMapthat checks whether aVertexis accessible to any type of traffic represented inaccessType.If a
Vertexis inaccessible, theRangeBasedPropertyMapreturnsList(.RangeBasedProperty(0.0, 1.0, false))The attribute is "optimistically" derived from four HERE Map Content attributes:
- TopologyAttributes.accessible_by
- TopologyAttributes.travel_direction
- TopologyAttributes.access_permission
- TopologyAttributes.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 aRangeBasedPropertyMapthat 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,
PropertyMapscontains 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 returnedRangeBasedPropertyMapcontains the values for only one attribute type. TheAttributeAccessorspecifies 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 theAttributeAccessorused 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- AnAttributeAccessorthat 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 aPropertyMapthat 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 returnedPropertyMapcontains the values for only one attribute type. TheAttributeAccessorspecifies 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 theAttributeAccessorused 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- AnAttributeAccessorthat 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 aRangeBasedPropertyMapthat 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 theAttributeAccessorused for caching purposes.accessor- anAttributeAccessorthat extracts the wanted attribute contained in theroad-attributeslayer 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)
-
TopologyAttributes.