HERE Content Bindings

The HERE Content package offers high level content bindings which allow you to more easily extract and manipulate HERE content. Currently, these content bindings are offered for the following layers in the HERE Map Content catalog:

  • ADAS Attributes
  • Administrative Locations
  • Administrative Places
  • Advanced Navigation Attributes
  • Navigation Attributes
  • Road Attributes
  • Street Names
  • Topology & Geometry
  • Traffic Patterns

The following tables list currently supported layers and attributes.

Single Layer Attributes

Layer ID Supported Attributes
topology-geometry nodes, segments
road-attributes accessible_by, overpass_underpass, functional_class, iso_country_code, physical, road_class, special_traffic_area_category, display_level
navigation-attributes access_permission, access_restriction, construction_status, gate, intersection_category, lane_category, through_lane_count, physical_lane_count, local_road, permitted_driving_manoeuvre, restricted_driving_manoeuvre, road_divider, road_usage, short_construction_warning, special_explication, speed_category, speed_limit, supplemental_geometry, through_route, toll_structure, traffic_message_channel_code, transport_protocol_expert_group, travel_direction, urban, usage_fee_required, environmental_zone_condition, junction_divider
advanced-navigation-attributes black_spot, grade_category, overtaking_restriction, protected_overtaking, railway_crossing, special_speed_situation, speed_limit, traffic_signal, traffic_sign, variable_speed_limit, variable_speed_sign, scenic, recreational_vehicle_restriction, vehicle_checkpoint
adas-attributes curvature_heading, slope, elevation, built_up_area_road, link_accuracy
address-attributes postal_code, administrative_context_attribute, address_range, street_section
street-names street_section, administrative_context
administrative-places place
administrative-locations location
environmental-zones environmental_zone
traffic-patterns traffic_pattern, holiday_pattern

Multi Layer Attributes

Layer IDs Supported Attributes
navigation-attributes, advanced-navigation-attributes speed limit
address-attributes, administrative-places, administrative-locations administrative boundaries
address-attributes, street-names street names
navigation-attributes, environmental-zones environmental zones

The accessor methods for all layers are similar. Below example illustrates the pattern by extracting functional class values from the Road Attributes layer. Please see the API documentation and the tutorial notebook named FunctionalClassCurvatureAnalysis_hmc.ipynb for additional detail.

Extract attributes within given partition

from here.platform import Platform
from here.content.hmc.hmc import HMC

# create HMC object
hmc = HMC(Platform())

# get attribute dictionary
atts = hmc.road_attributes.get_attribute("23618402", "functional_class")
{'here:cm:segment:209900713': {1: [<here.content.hmc.baseattributes.RangedAttribute at 0x1f8d1102790>,
   <here.content.hmc.baseattributes.RangedAttribute at 0x1f8d11028e0>,
   <here.content.hmc.baseattributes.RangedAttribute at 0x1f8d1102940>,
   <here.content.hmc.baseattributes.RangedAttribute at 0x1f8d11029a0>,
   <here.content.hmc.baseattributes.RangedAttribute at 0x1f8d1102a00>,
   ....

Extract attributes within given partition to a DataFrame

from here.platform import Platform
from here.content.hmc.hmc import HMC
from here.geopandas_adapter import GeoPandasAdapter
from here.geopandas_adapter.content.attributeadapter import AttributeAdapter

# create HMC object
hmc = HMC(Platform(adapter=GeoPandasAdapter()))

# extract attributes to DataFrame
hmc.road_attributes.adapter = AttributeAdapter()
df = hmc.road_attributes.get_attribute("23618402", "functional_class")
df.head(5)
partitionId segmentId direction start_offset end_offset attribute
0 23618402 here:cm:segment:209900713 1 0 0.255147 functional_class: FUNCTIONAL_CLASS_1
1 23618402 here:cm:segment:209900713 1 0.255147 0.395064 functional_class: FUNCTIONAL_CLASS_1
2 23618402 here:cm:segment:209900713 1 0.395064 0.481648 functional_class: FUNCTIONAL_CLASS_1
3 23618402 here:cm:segment:209900713 1 0.481648 0.555283 functional_class: FUNCTIONAL_CLASS_1
4 23618402 here:cm:segment:209900713 1 0.555283 0.58338 functional_class: FUNCTIONAL_CLASS_1

results matching ""

    No results matching ""