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 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.content.attributeadapter import AttributeAdapter

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

# 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 ""