Here Map Content (HMC) Bindings
1. Introduction
1.1 HMC
HERE Map Content(HMC) is a global and use-case agnostic Platform Data API catalog. It publishes HERE map data for Location Service development purposes. The catalog enables users to selectively consume features and attributes of interest for their use-case and select updated partitions only when getting the latest map data from the HERE Platform.
For more details: https://developer.here.com/documentation/here-map-content/dev_guide/topics/introduction.html
1.2 Content bindings
Content bindings provide access to content exposed in a layer(s). Bindings can be based on one of the existing layers, or based on a group of more layers.
Goal of content bindings is to provide a uniform way for final users to access a variety of complex data models, in a python-friendly way.
2. Layers supported
PySDK also supports below HMC bindings based on multiple layers.
- Administrative boundary for a segment
- Environmental zones for a segment
- Speed limit from navigation and advanced navigation attributes layers
- Street name for a segment
3. Using HMC Bindings
Binding have the following high-level API:
-
get
gives all the objects for one or more partitions -
get_ref
gives a single object -
get_referencing
gives all the objects based on reference given
Please note get_ref or get_referencing works only if object_type() have RefType.
Initialization
from here.platform import Platform
from here.geopandas_adapter import GeoPandasAdapter
from here.content.hmc2 import HMC
import pandas as pd
from here.platform.adapter import make_ref
from IPython.display import display, FileLink
platform = Platform()
hmc = HMC(platform, adapter=GeoPandasAdapter())
display(f"Catalog Id: {hmc.content.catalog_hrn} , Version:{hmc.content.version}")
'Catalog Id: hrn:here:data::olp-here:rib-2 , Version:4971'
def types_to_df(types):
def to_record(kv):
k, v = kv
return {
"Type": k,
"Data Class": '.'.join([v.__module__, v.__qualname__]),
"Index by partition": v.indexer.partition is not None,
"Index by ID": v.indexer.identifier is not None,
"Ref Types": ", ".join(v.indexer.refs.keys()) or None
}
return pd.DataFrame.from_records(map(to_record, types.items()), index="Type")
Warning: Before running below cells please make sure you add your API key. Please use API Id as API key.
from here_map_widget import GeoData
import here.geotiles.heretile as ht
from here_map_widget import Map
import geopandas as gpd
from shapely.geometry.polygon import Polygon
import os
api_key = os.environ["LS_API_KEY"]
def plot_geometry(dataFrame, geo_column):
geoDF = gpd.GeoDataFrame(dataFrame[dataFrame['location.geometry'] != None][[geo_column]].copy(),
geometry=geo_column)
center_point = geoDF[geo_column].centroid.head(1).values
geoData = GeoData(geo_dataframe=geoDF,
style={"strokeColor": "rgba(128,0,128,1)"},
hover_style={"strokeColor": "rgba(255,0,0,1)"},
name='geometry_layer')
m = Map(
api_key=api_key,
center=[center_point.y[0], center_point.x[0]],
zoom=12,
)
m.add_layer(geoData)
return m
def plot_here_tiles(tile_ids):
tiles = [Polygon(ht.get_boundary_ring(t)) for t in tile_ids]
tiles_df = pd.DataFrame(tiles, columns=["geometry"])
geoDF = gpd.GeoDataFrame(tiles_df, geometry='geometry')
center_point = geoDF['geometry'].centroid.head(1).values
geoData = GeoData(geo_dataframe=geoDF, style={"strokeColor": "rgba(128,0,128,1)"},
hover_style={"strokeColor": "rgba(255,0,0,1)"},
name='here_tiles')
m = Map(
api_key=api_key,
center=[center_point.y[0], center_point.x[0]],
zoom=12,
)
m.add_layer(geoData)
return m
def plot_multiple_geometry(geometries):
geoData_1 = GeoData(geo_dataframe=geometries['Nodes'],
style={"strokeColor": "rgba(128,0,128,1)"},
hover_style={"strokeColor": "rgba(255,0,0,1)"},
name='geometry_layer_1')
geoData_2 = GeoData(geo_dataframe=geometries['Segments'],
style={"strokeColor": "rgba(128,0,128,1)"},
hover_style={"strokeColor": "rgba(255,0,0,1)"},
name='geometry_layer_2')
center_point = (geometries['Nodes'].set_crs(epsg=4328, allow_override=True)).centroid.head(1).values
m = Map(
api_key=api_key,
center=[center_point.y[0], center_point.x[0]],
zoom=12,
)
m.add_layer(geoData_1)
m.add_layer(geoData_2)
return m
3.1 Street Names
Layer Id - Street Names
tiles = ['23671200-25332448-25332461', '1469256839-1469256831']
street_names = hmc.street_names
types_to_df(street_names.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
street | here.content.hmc2.street_names.StreetName | True | True | None |
context | here.content.hmc2.place_context.PlaceContext | False | False | None |
street_section | here.content.hmc2.street_names.StreetSection | True | True | None |
df = street_names.get(tiles, 'street')
df.head(2)
| | street_name |
partition_id | street_id | |
23671200-25332448-25332461 | here:af:street:-uHF.AB5MMLiE7ZrfjHYdB | [{'full_name': {'value': 'Calle a Horconcitos'... |
here:af:street:.ZBbv.1-mm9cnjrpQ2dpbB | [{'full_name': {'value': '1', 'language': 'es'... |
df = street_names.get(tiles, 'context')
df.head(2)
| classification_type | city | postal_code | country | state | region | county | district | sub_district | further_zone | default_mapping | political_view | political_view_exception |
0 | DISTRICT | [{'preference': 'PRIMARY', 'place_ref': {'part... | <NA> | [{'preference': 'PRIMARY', 'place_ref': {'part... | [{'preference': 'PRIMARY', 'place_ref': {'part... | <NA> | [{'preference': 'PRIMARY', 'place_ref': {'part... | [{'preference': 'ALTERNATIVE', 'place_ref': {'... | <NA> | <NA> | 0 | <NA> | <NA> |
1 | DISTRICT | [{'preference': 'PRIMARY', 'place_ref': {'part... | <NA> | [{'preference': 'PRIMARY', 'place_ref': {'part... | [{'preference': 'PRIMARY', 'place_ref': {'part... | <NA> | [{'preference': 'PRIMARY', 'place_ref': {'part... | [{'preference': 'ALTERNATIVE', 'place_ref': {'... | <NA> | <NA> | 0 | <NA> | <NA> |
df = street_names.get(tiles, 'street_section')
df.head(2)
| | street_index | administrative_context_index | associated_street_section_index | government_code |
partition_id | streetsection_id | | | | |
23671200-25332448-25332461 | here:af:streetsection:-ESjspGYVGcI6Q.8.SNQ7D | 27 | 55 | [33, 121, 171, 197] | |
here:af:streetsection:-QAlZDr2XhDrVNX74mGYWB | 83 | 7 | [50, 82, 131] | |
3.2 Traffic Patterns
Layer Id - traffic-patterns
tiles = [23618502]
traffic_patterns = hmc.traffic_patterns
types_to_df(traffic_patterns.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
traffic_pattern | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
holiday_pattern | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
traffic_pattern = traffic_patterns.get(tiles,"traffic_pattern")
traffic_pattern.head(2)
| segments | forward | backward | attribute.traffic_pattern |
0 | [{'ref': {'partition': '23618502', 'identifier... | True | False | [{'day_of_week': 'SUNDAY', 'speed_pattern': [{... |
1 | [{'ref': {'partition': '23618502', 'identifier... | True | False | [{'day_of_week': 'SUNDAY', 'speed_pattern': [{... |
holiday_pattern = traffic_patterns.get(tiles,"holiday_pattern")
holiday_pattern.head(2)
| segments | forward | backward | attribute.holiday |
0 | [{'ref': {'partition': '23618502', 'identifier... | True | False | [{'holiday_name': 'New Years Day', 'holiday_da... |
1 | [{'ref': {'partition': '23618502', 'identifier... | False | True | [{'holiday_name': 'New Years Day', 'holiday_da... |
traffic_pattern_ref = make_ref(23618502,"here:cm:segment:76770511")
traffic_pattern_attributes = traffic_patterns.get_referencing(
23618502, "traffic_pattern", "first_segment",
)
traffic_pattern_attributes.head(2)
| | segments | forward | backward | attribute.traffic_pattern |
ref_partition | ref_identifier | | | | |
23618502 | here:cm:segment:76770511 | [{'ref': {'partition': '23618502', 'identifier... | True | False | [{'day_of_week': 'SUNDAY', 'speed_pattern': [{... |
here:cm:segment:76770511 | [{'ref': {'partition': '23618502', 'identifier... | False | True | [{'day_of_week': 'SUNDAY', 'speed_pattern': [{... |
holiday_pattern_attributes = traffic_patterns.get_referencing(
23618502, "holiday_pattern", "first_segment",
)
holiday_pattern_attributes.head(2)
| | segments | forward | backward | attribute.holiday |
ref_partition | ref_identifier | | | | |
23618502 | here:cm:segment:76770511 | [{'ref': {'partition': '23618502', 'identifier... | True | False | [{'holiday_name': 'New Years Day', 'holiday_da... |
here:cm:segment:76770511 | [{'ref': {'partition': '23618502', 'identifier... | False | True | [{'holiday_name': 'New Years Day', 'holiday_da... |
3.3 Sign Text
Layer Id - sign-text
tiles = [18011924]
sign_text = hmc.sign_text
types_to_df(sign_text.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
sign_attribute | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
display(sign_text.ref_types())
{'sign_attribute': ['first_segment', 'segment']}
df = sign_text.get(tiles, "sign_attribute")
df.head(2)
| segments | forward | backward | attribute.identifier | attribute.destination |
0 | [{'ref': {'partition': '18011924', 'identifier... | True | True | here:cm:sign:1653326986 | [{'destination_segment_anchor_index': 2, 'sign... |
1 | [{'ref': {'partition': '18011924', 'identifier... | True | True | here:cm:sign:1653327084 | [{'destination_segment_anchor_index': 20, 'sig... |
df = sign_text.get_referencing(tiles, "sign_attribute", "segment")
df.head(2)
| | segments | forward | backward | attribute.identifier | attribute.destination |
ref_partition | ref_identifier | | | | | |
18011924 | here:cm:segment:360301727 | [{'ref': {'partition': '18011924', 'identifier... | True | True | here:cm:sign:1653326986 | [{'destination_segment_anchor_index': 2, 'sign... |
here:cm:segment:360301727 | [{'ref': {'partition': '18011924', 'identifier... | True | True | here:cm:sign:1653367409 | [{'destination_segment_anchor_index': 2, 'sign... |
df = sign_text.get_referencing(tiles, "sign_attribute", "first_segment")
df.head(2)
| | segments | forward | backward | attribute.identifier | attribute.destination |
ref_partition | ref_identifier | | | | | |
18011924 | here:cm:segment:360301727 | [{'ref': {'partition': '18011924', 'identifier... | True | True | here:cm:sign:1653326986 | [{'destination_segment_anchor_index': 2, 'sign... |
here:cm:segment:360301727 | [{'ref': {'partition': '18011924', 'identifier... | True | True | here:cm:sign:1653367409 | [{'destination_segment_anchor_index': 2, 'sign... |
3.4 Administrative Places
Layer Id - administrative-places
admin_places = hmc.admin_places
types_to_df(admin_places.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
place | here.content.hmc2.admin_places.Place | True | True | None |
context | here.content.hmc2.place_context.PlaceContext | False | False | None |
admin_tiles = ["20000001", "20000001-20000002-20030132"]
df = admin_places.get(admin_tiles, "place")
df.head(2)
| | name | category | alt_category | location_ref.partition | location_ref.identifier | valid_unnamed | daylight_saving_time.day_of_week_of_month_of_year_range.start.day_of_week | daylight_saving_time.day_of_week_of_month_of_year_range.start.week_of_month | daylight_saving_time.day_of_week_of_month_of_year_range.start.month_of_year | daylight_saving_time.day_of_week_of_month_of_year_range.end.day_of_week | ... | country.internal_phone_prefix | capital_indicator | population | daylight_saving_time | administrative_restriction | country | capital_indicator.capital_of_county | capital_indicator.capital_of_country | capital_indicator.capital_of_state | capital_indicator.capital_of_city |
partition_id | place_id | | | | | | | | | | | | | | | | | | | | | |
20000001 | here:cm:namedplace:20000001 | [{'text': {'value': 'France', 'language': 'fr'... | [{'partition': '', 'identifier': 'here:cm:admi... | <NA> | 20000001 | here:cm:namedplace-loc:20000001 | True | SUNDAY | WEEK_5 | MARCH | SUNDAY | ... | 0 | <NA> | <NA> | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
here:cm:namedplace:20000002 | [{'text': {'value': 'Hauts-de-France', 'langua... | [{'partition': '', 'identifier': 'here:cm:admi... | <NA> | 20000001 | here:cm:namedplace-loc:20000002 | True | NaN | NaN | NaN | NaN | ... | NaN | <NA> | <NA> | <NA> | <NA> | <NA> | NaN | NaN | NaN | NaN |
2 rows × 50 columns
df = admin_places.get(admin_tiles, "context")
df.head(2)
| classification_type | city | postal_code | country | state | region | county | district | sub_district | further_zone | default_mapping | political_view | political_view_exception |
0 | COUNTRY | <NA> | <NA> | [{'preference': 'PRIMARY', 'place_ref': {'part... | <NA> | <NA> | <NA> | <NA> | <NA> | <NA> | 0 | <NA> | <NA> |
1 | STATE | <NA> | <NA> | [{'preference': 'PRIMARY', 'place_ref': {'part... | [{'preference': 'PRIMARY', 'place_ref': {'part... | <NA> | <NA> | <NA> | <NA> | <NA> | 0 | <NA> | <NA> |
3.5 Administrative Locations
Layer Id - administrative-locations
admin_locations = hmc.admin_locations
types_to_df(admin_locations.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
location | here.content.hmc2.admin_locations.Location | True | True | None |
df = admin_locations.get(partition="21000001", object_type="location")
df.head(2)
| | location_type | display_position | geometry | address_relation | area_type | segment_anchor.oriented_segment_ref | segment_anchor.attribute_orientation | segment_anchor_side | accessors | political_geometry | alternate_geometry | within_location_ref.partition_name | within_location_ref.identifier | bounding_box | level_info |
partition_id | location_id | | | | | | | | | | | | | | | |
21000001 | here:cm:namedplace-loc:21000001 | AREA | POINT (0.00000 0.00000) | MULTIPOLYGON (((-80.44630 25.05270, -80.44623 ... | ADDRESS_RELATION_UNSPECIFIC | AREA_TYPE_STANDARD | [] | RELATIVE_DIRECTION_UNKNOWN | SIDE_UNKNOWN | <NA> | [] | [] | | | | |
here:cm:namedplace-loc:21000002 | AREA | POINT (0.00000 0.00000) | MULTIPOLYGON (((-89.75324 48.02223, -89.75313 ... | ADDRESS_RELATION_UNSPECIFIC | AREA_TYPE_STANDARD | [] | RELATIVE_DIRECTION_UNKNOWN | SIDE_UNKNOWN | <NA> | [] | [] | | | | |
3.6 Administrative Place Profiles
Layer Id - administrative_place_profiles
admin_place_profiles = hmc.admin_place_profiles
df = admin_place_profiles.get(partition = "21000001", object_type="admin_place_profile_attributes")
df.head(2)
| administrative_place_ref.partition | administrative_place_ref.identifier | move_over | make_way | overtake_pass | merging | right_of_way | keep_right | solid_lane_travers_general | solid_lane_exception | color_temp_marking | dashed_width_lar | dashed_width_non_lar | spaces_marking_lar | spaces_marking_non_lar | solid_edge_width_lar | solid_edge_width_non_lar | average_lane_width_mtrw | average_lane_width_non_mtrw |
partition_id | | | | | | | | | | | | | | | | | | | |
21000001 | 21000001 | here:cm:namedplace:21000001 | <NA> | <NA> | <NA> | <NA> | <NA> | <NA> | <NA> | <NA> | <NA> | 0.15 | 0.1 | <NA> | <NA> | 0.15 | 0.1 | 3.6 | 3.3 |
21000001 | 21000001 | here:cm:namedplace:21000002 | 3 | True | False | 5 | 1 | True | False | 63 | 13 | <NA> | <NA> | <NA> | <NA> | <NA> | <NA> | <NA> | <NA> |
ref = make_ref("21000001", "here:cm:namedplace:21000002")
admin_place_profiles.get_referencing(
partition = "21000001", object_type="admin_place_profile_attributes", ref_type="place", referenced_obj=ref
)
| partition_id | administrative_place_ref.partition | administrative_place_ref.identifier | move_over | make_way | overtake_pass | merging | right_of_way | keep_right | solid_lane_travers_general | solid_lane_exception | color_temp_marking | dashed_width_lar | dashed_width_non_lar | spaces_marking_lar | spaces_marking_non_lar | solid_edge_width_lar | solid_edge_width_non_lar | average_lane_width_mtrw | average_lane_width_non_mtrw |
0 | 21000001 | 21000001 | here:cm:namedplace:21000002 | 3 | True | False | 5 | 1 | True | False | 63 | 13 | <NA> | <NA> | <NA> | <NA> | <NA> | <NA> | <NA> | <NA> |
3.8 Indexed Locations
Layer Id - indexed_locations
admin_index = hmc.admin_index
types_to_df(admin_index.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
country | here.content.hmc2.admin_index.CountryTiles | False | True | None |
location | here.content.hmc2.admin_index.LocationTiles | False | False | location |
country_partitions = ["FIN", "HND", "IRL"]
country_tiles = admin_index.get(country_partitions, "country")
country_tiles
| tile_id |
iso_country_code | |
FIN | [23648741, 23648743, 23648745, 23648752, 23648... |
HND | [19956478, 19956479, 19956574, 19956575, 19956... |
IRL | [20799693, 20799695, 20799704, 20799705, 20799... |
country_tiles.explode("tile_id")
| tile_id |
iso_country_code | |
FIN | 23648741 |
FIN | 23648743 |
FIN | 23648745 |
FIN | 23648752 |
FIN | 23648754 |
... | ... |
IRL | 20803192 |
IRL | 20803193 |
IRL | 20803338 |
IRL | 20803360 |
IRL | 20803361 |
11735 rows × 1 columns
plot_here_tiles(country_tiles.loc["FIN"]["tile_id"])
Map(center=[60.1611328125, 19.2919921875], controls=(ZoomControl(alignment='LEFT_TOP'),), layers=(GeoData(data…
plot_here_tiles(country_tiles.loc["IRL"]["tile_id"])
Map(center=[51.5478515625, -10.2392578125], controls=(ZoomControl(alignment='LEFT_TOP'),), layers=(GeoData(dat…
df = admin_index.get_referencing(country_partitions, "location", "location")
df.head(2)
| | iso_country_code | tile_id | boundary_tile_id |
ref_partition | ref_identifier | | | |
20241487 | here:cm:namedplace-loc:20241487 | FIN | [23648741, 23648743, 23648745, 23648752, 23648... | [23648741, 23648743, 23648745, 23648752, 23648... |
here:cm:namedplace-loc:20422913 | FIN | [23693371, 23693445, 23693453, 23693456, 23693... | [23693371, 23693445, 23693453, 23693456, 23693... |
3.8 Environmental Zones
Layer Id - environmental_zones
environmental_zones = hmc.environmental_zones
types_to_df(environmental_zones.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
zone | here.content.hmc2.environmental_zones.Zone | False | True | location |
environmental_zones.ref_types()
{'zone': ['location']}
types_to_df(environmental_zones.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
zone | here.content.hmc2.environmental_zones.Zone | False | True | location |
env_zones = environmental_zones.get("all", "zone")
env_zones.head(2)
| name | info.description | info.website.value | info.website.language | info.version_date | info.extent_date | info.country | vehicle_class | environmental_badge | location_ref |
identifier | | | | | | | | | | |
here:cm:envzone:1 | [{'text': {'value': 'Augsburg Umweltzone', 'la... | [{'value': 'Die Umweltzone der Stadt Augsburg ... | https://www.augsburg.de/umwelt-soziales/umwelt... | | 2019-05-09 | 2019-01-01 | GERMANY | [{'vehicle_attributes': {'category': 'AUTO', '... | [{'badge_type': 'DEU_GREEN_STICKER', 'zone_acc... | [{'partition': '23600504', 'identifier': 'here... |
here:cm:envzone:10 | [{'text': {'value': 'Essen Umweltzone', 'langu... | [{'value': 'Die Umweltzone der Stadt Essen ist... | https://www.essen.de/leben/umwelt/luft/umweltz... | | 2022-06-03 | 2019-01-01 | GERMANY | [{'vehicle_attributes': {'category': 'AUTO', '... | [{'badge_type': 'DEU_GREEN_STICKER', 'zone_acc... | [{'partition': '23605461', 'identifier': 'here... |
location_ref = make_ref("23600686", "here:cm:carto-loc:1661293691")
env_zones = environmental_zones.get_referencing("all", "zone", "location", location_ref)
env_zones
| identifier | name | info.description | info.website.value | info.website.language | info.version_date | info.extent_date | info.country | vehicle_class | environmental_badge | location_ref |
0 | here:cm:envzone:304 | [{'text': {'value': 'Lkw-Verbotszone Darmstadt... | [{'value': 'Permanent truck ban for environmen... | https://umwelt.hessen.de/sites/default/files/m... | | 2020-11-06 | 2020-09-18 | GERMANY | [{'vehicle_attributes': {'category': 'TRUCK', ... | <NA> | [{'partition': '23600686', 'identifier': 'here... |
3.9 Topology Geometry
Layer Id - topology-geometry
topology_geometry = hmc.topology_geometry
types_to_df(topology_geometry.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
node | here.content.hmc2.topology_geometry.Node | True | True | None |
segment | here.content.hmc2.topology_geometry.Segment | True | True | None |
topology_geometry.ref_types()
{'node': [], 'segment': []}
types_to_df(topology_geometry.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
node | here.content.hmc2.topology_geometry.Node | True | True | None |
segment | here.content.hmc2.topology_geometry.Segment | True | True | None |
tiles =[19318110]
nodes = topology_geometry.get(tiles, "node")
nodes.head(2)
| | segment_ref | geometry | z_level |
partition_id | node_id | | | |
19318110 | here:cm:node:19706971 | [{'partition': '19318110', 'identifier': 'here... | POINT (-118.22421 34.05270) | 0 |
here:cm:node:19706990 | [{'partition': '19318110', 'identifier': 'here... | POINT (-118.21862 34.04096) | 0 |
segments = topology_geometry.get(tiles, "segment")
segments.head(2)
| | start_node_ref.partition | start_node_ref.identifier | end_node_ref.partition | end_node_ref.identifier | geometry | z_level | length |
partition_id | segment_id | | | | | | | |
19318110 | here:cm:segment:395921031 | 19318110 | here:cm:node:49251578 | 19318110 | here:cm:node:49251579 | LINESTRING (-118.27758 34.03233, -118.27676 34... | [0, 0] | 159.93573 |
here:cm:segment:395921122 | 19318110 | here:cm:node:49256445 | 19318110 | here:cm:node:49256415 | LINESTRING (-118.28938 34.07907, -118.28964 34... | [0, 0, 0, 0] | 126.02132 |
geometries={"Nodes": nodes, "Segments": segments}
plot_multiple_geometry(geometries)
Map(center=[34.0527, -118.22421], controls=(ZoomControl(alignment='LEFT_TOP'),), layers=(GeoData(data={'type':…
3.10 Road Attributes
Layer Id - road-attributes
road_attributes = hmc.road_attributes
types_to_df(road_attributes.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
accessible_by | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
overpass_underpass | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
functional_class | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
iso_country_code | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
physical | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
road_class | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
special_traffic_area_category | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
display_level | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
road_attributes.ref_types()
{'accessible_by': ['first_segment', 'segment'],
'overpass_underpass': ['first_segment', 'segment'],
'functional_class': ['first_segment', 'segment'],
'iso_country_code': ['first_segment', 'segment'],
'physical': ['first_segment', 'segment'],
'road_class': ['first_segment', 'segment'],
'special_traffic_area_category': ['first_segment', 'segment'],
'display_level': ['first_segment', 'segment']}
types_to_df(road_attributes.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
accessible_by | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
overpass_underpass | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
functional_class | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
iso_country_code | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
physical | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
road_class | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
special_traffic_area_category | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
display_level | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
tiles = [19318110]
df = road_attributes.get(tiles, "functional_class")
df.head(2)
| segments | forward | backward | attribute.functional_class |
0 | [{'ref': {'partition': '19318110', 'identifier... | True | True | FUNCTIONAL_CLASS_2 |
1 | [{'ref': {'partition': '19318110', 'identifier... | True | True | FUNCTIONAL_CLASS_2 |
df = road_attributes.get_referencing(tiles, "functional_class", "segment")
df.head(2)
| | segments | forward | backward | attribute.functional_class |
ref_partition | ref_identifier | | | | |
19318110 | here:cm:segment:396833168 | [{'ref': {'partition': '19318110', 'identifier... | True | True | FUNCTIONAL_CLASS_2 |
here:cm:segment:401176267 | [{'ref': {'partition': '19318110', 'identifier... | True | True | FUNCTIONAL_CLASS_2 |
df = road_attributes.get_referencing(tiles, "iso_country_code", "segment")
df.head(2)
| | segments | forward | backward | attribute.iso_country_code.official_country_code |
ref_partition | ref_identifier | | | | |
19318110 | here:cm:segment:395921031 | [{'ref': {'partition': '19318110', 'identifier... | True | True | USA |
here:cm:segment:395921122 | [{'ref': {'partition': '19318110', 'identifier... | True | True | USA |
df = road_attributes.get_referencing(tiles, "iso_country_code", "segment")
df.head(2)
| | segments | forward | backward | attribute.iso_country_code.official_country_code |
ref_partition | ref_identifier | | | | |
19318110 | here:cm:segment:395921031 | [{'ref': {'partition': '19318110', 'identifier... | True | True | USA |
here:cm:segment:395921122 | [{'ref': {'partition': '19318110', 'identifier... | True | True | USA |
3.11 Navigation Attributes
Layer Id - navigation-attributes
navigation_attributes = hmc.navigation_attributes
types_to_df(navigation_attributes.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
access_permission | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
access_restriction | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
construction_status | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
gate | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
intersection_category | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
lane_category | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
through_lane_count | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
physical_lane_count | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
local_road | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
low_mobility | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
permitted_driving_manoeuvre | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
restricted_driving_manoeuvre | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
road_divider | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
road_usage | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
short_construction_warning | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
special_explication | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
speed_category | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
speed_limit | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
supplemental_geometry | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
through_route | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
toll_structure | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
traffic_message_channel_code | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
transport_protocol_expert_group | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
travel_direction | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
urban | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
usage_fee_required | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
environmental_zone_condition | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
junction_divider | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
navigation_attributes.ref_types()
{'access_permission': ['first_segment', 'segment'],
'access_restriction': ['first_segment', 'segment'],
'construction_status': ['first_segment', 'segment'],
'gate': ['first_segment', 'segment'],
'intersection_category': ['first_segment', 'segment'],
'lane_category': ['first_segment', 'segment'],
'through_lane_count': ['first_segment', 'segment'],
'physical_lane_count': ['first_segment', 'segment'],
'local_road': ['first_segment', 'segment'],
'low_mobility': ['first_segment', 'segment'],
'permitted_driving_manoeuvre': ['first_segment', 'segment'],
'restricted_driving_manoeuvre': ['first_segment', 'segment'],
'road_divider': ['first_segment', 'segment'],
'road_usage': ['first_segment', 'segment'],
'short_construction_warning': ['first_segment', 'segment'],
'special_explication': ['first_segment', 'segment'],
'speed_category': ['first_segment', 'segment'],
'speed_limit': ['first_segment', 'segment'],
'supplemental_geometry': ['first_segment', 'segment'],
'through_route': ['first_segment', 'segment'],
'toll_structure': ['first_segment', 'segment'],
'traffic_message_channel_code': ['first_segment', 'segment'],
'transport_protocol_expert_group': ['first_segment', 'segment'],
'travel_direction': ['first_segment', 'segment'],
'urban': ['first_segment', 'segment'],
'usage_fee_required': ['first_segment', 'segment'],
'environmental_zone_condition': ['first_segment', 'segment'],
'junction_divider': ['first_segment', 'segment']}
types_to_df(navigation_attributes.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
access_permission | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
access_restriction | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
construction_status | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
gate | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
intersection_category | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
lane_category | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
through_lane_count | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
physical_lane_count | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
local_road | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
low_mobility | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
permitted_driving_manoeuvre | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
restricted_driving_manoeuvre | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
road_divider | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
road_usage | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
short_construction_warning | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
special_explication | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
speed_category | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
speed_limit | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
supplemental_geometry | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
through_route | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
toll_structure | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
traffic_message_channel_code | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
transport_protocol_expert_group | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
travel_direction | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
urban | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
usage_fee_required | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
environmental_zone_condition | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
junction_divider | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
tiles = [19318110]
df = navigation_attributes.get(tiles, "speed_limit")
df.head(2)
| segments | forward | backward | attribute.value | attribute.source | attribute.unlimited |
0 | [{'ref': {'partition': '19318110', 'identifier... | False | True | 32 | DERIVED | False |
1 | [{'ref': {'partition': '19318110', 'identifier... | False | True | 32 | DERIVED | False |
df = navigation_attributes.get(tiles, "traffic_message_channel_code")
df.head(2)
| segments | forward | backward | attribute.location_code | attribute.location_disposition | attribute.location_table_number | attribute.ebu_country_code |
0 | [{'ref': {'partition': '19318110', 'identifier... | True | False | 4488 | EXTERNAL_POSITIVE_DIRECTION | 6 | 1 |
1 | [{'ref': {'partition': '19318110', 'identifier... | True | False | 4488 | EXTERNAL_POSITIVE_DIRECTION | 6 | 1 |
df = navigation_attributes.get(tiles, "restricted_driving_manoeuvre")
df.head(2)
| segments | forward | backward | attribute.applies_to.buses | attribute.applies_to.automobiles | attribute.applies_to.taxis | attribute.applies_to.carpools | attribute.applies_to.pedestrians | attribute.applies_to.trucks | attribute.applies_to.through_traffic | attribute.applies_to.deliveries | attribute.applies_to.emergency_vehicles | attribute.applies_to.motorcycles | attribute.applies_to.bicycles | attribute.restriction_type | attribute.applies_during |
0 | [{'ref': {'partition': '19318110', 'identifier... | True | False | True | False | False | False | False | False | False | False | False | False | False | LEGAL | [] |
1 | [{'ref': {'partition': '19318110', 'identifier... | True | False | False | True | True | True | False | True | True | True | False | True | False | LEGAL | [] |
df = navigation_attributes.get(tiles, "travel_direction")
df.head(2)
| segments | forward | backward |
0 | [{'ref': {'partition': '19318110', 'identifier... | True | True |
1 | [{'ref': {'partition': '19318110', 'identifier... | True | False |
df = navigation_attributes.get([18403672], "environmental_zone_condition")
df.head(2)
| segments | forward | backward | attribute.applies_to.automobiles | attribute.applies_to.carpools | attribute.applies_to.trucks | attribute.applies_to.through_traffic | attribute.applies_to.deliveries | attribute.applies_to.motorcycles | attribute.applies_to.buses | attribute.applies_to.taxis | attribute.applies_to.pedestrians | attribute.applies_to.emergency_vehicles | attribute.applies_to.bicycles | attribute.environmental_zone_ref.partition_name | attribute.environmental_zone_ref.identifier |
0 | [{'ref': {'partition': '18403672', 'identifier... | True | True | True | True | True | True | True | True | False | False | False | False | False | all | here:cm:envzone:227 |
1 | [{'ref': {'partition': '18403672', 'identifier... | True | True | True | True | True | True | True | True | False | False | False | False | False | all | here:cm:envzone:227 |
df = navigation_attributes.get_referencing(tiles, "restricted_driving_manoeuvre", "first_segment")
df.head(2)
| | segments | forward | backward | attribute.applies_to.buses | attribute.applies_to.automobiles | attribute.applies_to.taxis | attribute.applies_to.carpools | attribute.applies_to.pedestrians | attribute.applies_to.trucks | attribute.applies_to.through_traffic | attribute.applies_to.deliveries | attribute.applies_to.emergency_vehicles | attribute.applies_to.motorcycles | attribute.applies_to.bicycles | attribute.restriction_type | attribute.applies_during |
ref_partition | ref_identifier | | | | | | | | | | | | | | | | |
19318110 | here:cm:segment:397212474 | [{'ref': {'partition': '19318110', 'identifier... | True | False | True | False | False | False | False | False | False | False | False | False | False | LEGAL | [] |
here:cm:segment:421671070 | [{'ref': {'partition': '19318110', 'identifier... | True | False | False | True | True | True | False | True | True | True | False | True | False | LEGAL | [] |
3.12 Advanced Navigation Attributes
Layer Id - advanced-navigation-attributes
adv_navigation_attributes = hmc.advanced_navigation_attributes
types_to_df(adv_navigation_attributes.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
black_spot | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
grade_category | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
overtaking_restriction | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
protected_overtaking | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
railway_crossing | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
special_speed_situation | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
speed_limit | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
traffic_signal | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
traffic_sign | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
variable_speed_limit | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
variable_speed_sign | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
scenic | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
recreational_vehicle_restriction | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
vehicle_checkpoint | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
adv_navigation_attributes.ref_types()
{'black_spot': ['first_segment', 'segment'],
'grade_category': ['first_segment', 'segment'],
'overtaking_restriction': ['first_segment', 'segment'],
'protected_overtaking': ['first_segment', 'segment'],
'railway_crossing': ['first_segment', 'segment'],
'special_speed_situation': ['first_segment', 'segment'],
'speed_limit': ['first_segment', 'segment'],
'traffic_signal': ['first_segment', 'segment'],
'traffic_sign': ['first_segment', 'segment'],
'variable_speed_limit': ['first_segment', 'segment'],
'variable_speed_sign': ['first_segment', 'segment'],
'scenic': ['first_segment', 'segment'],
'recreational_vehicle_restriction': ['first_segment', 'segment'],
'vehicle_checkpoint': ['first_segment', 'segment']}
types_to_df(adv_navigation_attributes.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
black_spot | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
grade_category | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
overtaking_restriction | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
protected_overtaking | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
railway_crossing | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
special_speed_situation | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
speed_limit | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
traffic_signal | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
traffic_sign | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
variable_speed_limit | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
variable_speed_sign | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
scenic | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
recreational_vehicle_restriction | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
vehicle_checkpoint | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
tiles = [19318110]
df = adv_navigation_attributes.get(tiles, "speed_limit")
df.head(2)
| segments | forward | backward | attribute.value | attribute.source | attribute.unlimited |
0 | [{'ref': {'partition': '19318110', 'identifier... | True | False | 8 | POSTED | False |
1 | [{'ref': {'partition': '19318110', 'identifier... | False | True | 8 | POSTED | False |
df = adv_navigation_attributes.get(tiles, "traffic_signal")
df.head(2)
| segments | forward | backward | attribute.signal_location |
0 | [{'ref': {'partition': '19318110', 'identifier... | True | False | SIGN_LOCATION_UNKNOWN |
1 | [{'ref': {'partition': '19318110', 'identifier... | False | True | SIGN_LOCATION_UNKNOWN |
df = adv_navigation_attributes.get(tiles, "traffic_sign")
df.head(2)
| segments | forward | backward | attribute.traffic_sign_type | attribute.traffic_sign_category | attribute.traffic_sign_value.value | attribute.traffic_sign_value.language | attribute.pre_warning.value | attribute.pre_warning.language | attribute.duration.value | ... | attribute.validity_time.language | attribute.general_warning_sign_type | attribute.traffic_sign_subcategory | attribute.weather_type | attribute.accessible_by.trucks | attribute.accessible_by.heavy_trucks | attribute.accessible_by.bus | attribute.accessible_by.auto_trailer | attribute.accessible_by.motorhome | attribute.accessible_by.motorcycle |
0 | [{'ref': {'partition': '19318110', 'identifier... | True | False | START_OF_NO_OVERTAKING | REGULATORY_SIGN | | | | | | ... | | GENERAL_WARNING_SIGN_TYPE_UNKNOWN | TRAFFIC_SIGN_SUBCATEGORY_UNKNOWN | WEATHER_TYPE_UNKNOWN | NaN | NaN | NaN | NaN | NaN | NaN |
1 | [{'ref': {'partition': '19318110', 'identifier... | False | True | START_OF_NO_OVERTAKING | REGULATORY_SIGN | | | | | | ... | | GENERAL_WARNING_SIGN_TYPE_UNKNOWN | TRAFFIC_SIGN_SUBCATEGORY_UNKNOWN | WEATHER_TYPE_UNKNOWN | False | False | False | False | False | False |
2 rows × 22 columns
df = adv_navigation_attributes.get_referencing(tiles, "traffic_sign", "first_segment")
df.head(2)
| | segments | forward | backward | attribute.traffic_sign_type | attribute.traffic_sign_category | attribute.traffic_sign_value.value | attribute.traffic_sign_value.language | attribute.pre_warning.value | attribute.pre_warning.language | attribute.duration.value | ... | attribute.validity_time.language | attribute.general_warning_sign_type | attribute.traffic_sign_subcategory | attribute.weather_type | attribute.accessible_by.trucks | attribute.accessible_by.heavy_trucks | attribute.accessible_by.bus | attribute.accessible_by.auto_trailer | attribute.accessible_by.motorhome | attribute.accessible_by.motorcycle |
ref_partition | ref_identifier | | | | | | | | | | | | | | | | | | | | | |
19318110 | here:cm:segment:857331872 | [{'ref': {'partition': '19318110', 'identifier... | True | False | START_OF_NO_OVERTAKING | REGULATORY_SIGN | | | | | | ... | | GENERAL_WARNING_SIGN_TYPE_UNKNOWN | TRAFFIC_SIGN_SUBCATEGORY_UNKNOWN | WEATHER_TYPE_UNKNOWN | NaN | NaN | NaN | NaN | NaN | NaN |
here:cm:segment:411531225 | [{'ref': {'partition': '19318110', 'identifier... | False | True | START_OF_NO_OVERTAKING | REGULATORY_SIGN | | | | | | ... | | GENERAL_WARNING_SIGN_TYPE_UNKNOWN | TRAFFIC_SIGN_SUBCATEGORY_UNKNOWN | WEATHER_TYPE_UNKNOWN | False | False | False | False | False | False |
2 rows × 22 columns
df = adv_navigation_attributes.get(tiles, "railway_crossing")
df.head(2)
| segments | forward | backward | attribute.crossing_type |
0 | [{'ref': {'partition': '19318110', 'identifier... | True | False | PROTECTED |
1 | [{'ref': {'partition': '19318110', 'identifier... | False | True | PROTECTED |
df = adv_navigation_attributes.get_referencing(tiles, "railway_crossing", "segment")
df.head(2)
| | segments | forward | backward | attribute.crossing_type |
ref_partition | ref_identifier | | | | |
19318110 | here:cm:segment:455427404 | [{'ref': {'partition': '19318110', 'identifier... | True | False | PROTECTED |
here:cm:segment:455427404 | [{'ref': {'partition': '19318110', 'identifier... | False | True | PROTECTED |
3.13 Bicycle Attributes
Layer Id - bicycle-attributes
bicycle_attributes = hmc.bicycle_attributes
types_to_df(bicycle_attributes.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
bicycle_access_override | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
bicycle_protection_type | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
bicycle_travel_direction_override | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
dedicated_bicycle_path | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
bicycle_path | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
bicycle_access_verified | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
bicycle_attributes.ref_types()
{'bicycle_access_override': ['first_segment', 'segment'],
'bicycle_protection_type': ['first_segment', 'segment'],
'bicycle_travel_direction_override': ['first_segment', 'segment'],
'dedicated_bicycle_path': ['first_segment', 'segment'],
'bicycle_path': ['first_segment', 'segment'],
'bicycle_access_verified': ['first_segment', 'segment']}
types_to_df(bicycle_attributes.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
bicycle_access_override | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
bicycle_protection_type | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
bicycle_travel_direction_override | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
dedicated_bicycle_path | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
bicycle_path | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
bicycle_access_verified | here.content.hmc2.base_attributes.Attribute | False | False | first_segment, segment |
tiles = [19318110]
df = bicycle_attributes.get_referencing(tiles, "bicycle_path", "segment")
df.head(2)
| | segments | forward | backward | attribute.separately_digitized | attribute.dedicated_bicycle_path | attribute.surface_type |
ref_partition | ref_identifier | | | | | | |
19318110 | here:cm:segment:399602652 | [{'ref': {'partition': '19318110', 'identifier... | True | True | True | SIDE_UNKNOWN | SURFACE_TYPE_UNKNOWN |
here:cm:segment:420339828 | [{'ref': {'partition': '19318110', 'identifier... | True | True | True | SIDE_UNKNOWN | SURFACE_TYPE_UNKNOWN |
df = bicycle_attributes.get_referencing(tiles, "dedicated_bicycle_path", "segment")
df.head(2)
Layer Id - places-metadata
places_metadata = hmc.places_metadata
types_to_df(places_metadata.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
category_system | here.content.hmc2.metadata.CategorySystem | False | True | None |
category | here.content.hmc2.metadata.Category | False | True | None |
places_metadata.get("all", "category_system")
| name.text.value | name.text.language | name.name_type | name.representation | description |
identifier | | | | | |
here:pds:chain_families:chain_families | chain_families | | NAME_TYPE_UNKNOWN | [] | <NA> |
here:pds:chains:chains | chains | | NAME_TYPE_UNKNOWN | [] | <NA> |
here:pds:lcms-foodtype:lcms-foodtype | lcms-foodtype | | NAME_TYPE_UNKNOWN | [] | <NA> |
here:pds:navteq-lcms:navteq-lcms | navteq-lcms | | NAME_TYPE_UNKNOWN | [] | <NA> |
here:pds:nokia-foodtype:nokia-foodtype | nokia-foodtype | | NAME_TYPE_UNKNOWN | [] | <NA> |
df = places_metadata.get("all", "category")
df.head(2)
| name.text.value | name.text.language | name.name_type | name.representation | description.text.value | description.text.language | description.name_type | description.representation | category_system | description |
identifier | | | | | | | | | | |
here:pds:chain_families:10001 | BMW | en | NAME_TYPE_UNKNOWN | [] | BMW | en | NAME_TYPE_UNKNOWN | [] | here:pds:chain_families:chain_families | NaN |
here:pds:chain_families:10002 | FIAT | en | NAME_TYPE_UNKNOWN | [] | NaN | NaN | NaN | NaN | here:pds:chain_families:chain_families | <NA> |
Layer Id - building-metadata
building_metadata = hmc.building_metadata
types_to_df(building_metadata.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
category_system | here.content.hmc2.metadata.CategorySystem | False | True | None |
category | here.content.hmc2.metadata.Category | False | True | None |
building_metadata.get("all", "category_system")
| name.text.value | name.text.language | name.name_type | name.representation | description.text.value | description.text.language | description.name_type | description.representation |
identifier | | | | | | | | |
here:cm:building-category:1999217009 | FEATSTP | | NAME_TYPE_UNKNOWN | [] | Feature Sub-Types | | NAME_TYPE_UNKNOWN | [] |
here:cm:building-category:1999021584 | FEATURE | | NAME_TYPE_UNKNOWN | [] | Feature Type | | NAME_TYPE_UNKNOWN | [] |
here:cm:building-category:7979404116 | JPN_CARTOFEATURE_TYPES | | NAME_TYPE_UNKNOWN | [] | Cartofeatures that are unique to Japan | | NAME_TYPE_UNKNOWN | [] |
here:cm:building-category:7979406126 | JPN_FEATSTP | | NAME_TYPE_UNKNOWN | [] | Japan specific building types | | NAME_TYPE_UNKNOWN | [] |
df = building_metadata.get("all", "category")
df.head(2)
| name.text.value | name.text.language | name.name_type | name.representation | description | category_system |
identifier | | | | | | |
here:cm:building-category:2005000 | BUSINESS/COMMERCE BUILDING/LANDMARK | | NAME_TYPE_UNKNOWN | [] | <NA> | here:cm:building-category:1999217009 |
here:cm:building-category:2005000 | Business/Commerce Building/Landmark | | NAME_TYPE_UNKNOWN | [] | <NA> | here:cm:building-category:1999021584 |
Layer Id - cartography-metadata
cartography_metadata = hmc.cartography_metadata
types_to_df(places_metadata.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
category_system | here.content.hmc2.metadata.CategorySystem | False | True | None |
category | here.content.hmc2.metadata.Category | False | True | None |
cartography_metadata.get("all", "category_system")
| name.text.value | name.text.language | name.name_type | name.representation | description.text.value | description.text.language | description.name_type | description.representation |
identifier | | | | | | | | |
here:cm:carto-category:1999893136 | CLS_PUBLISHED_FEATURES | | NAME_TYPE_UNKNOWN | [] | CLS_PUBLISHED_FEATURES | | NAME_TYPE_UNKNOWN | [] |
here:cm:carto-category:1999021599 | DISPCLAS | | NAME_TYPE_UNKNOWN | [] | Display Class | | NAME_TYPE_UNKNOWN | [] |
here:cm:carto-category:1999021584 | FEATURE | | NAME_TYPE_UNKNOWN | [] | Feature Type | | NAME_TYPE_UNKNOWN | [] |
here:cm:carto-category:7979404116 | JPN_CARTOFEATURE_TYPES | | NAME_TYPE_UNKNOWN | [] | Cartofeatures that are unique to Japan | | NAME_TYPE_UNKNOWN | [] |
here:cm:carto-category:7979406126 | JPN_FEATSTP | | NAME_TYPE_UNKNOWN | [] | Japan specific building types | | NAME_TYPE_UNKNOWN | [] |
here:cm:carto-category:1999918379 | LANDCOVER_CLASS | | NAME_TYPE_UNKNOWN | [] | LANDCOVER_CLASS | | NAME_TYPE_UNKNOWN | [] |
df = cartography_metadata.get("all", "category")
df.head(2)
| name.text.value | name.text.language | name.name_type | name.representation | description | category_system |
identifier | | | | | | |
here:cm:carto-category: | NOT APPLICABLE | | NAME_TYPE_UNKNOWN | [] | <NA> | here:cm:carto-category:1999021599 |
here:cm:carto-category:1 | FIRST CLASS | | NAME_TYPE_UNKNOWN | [] | <NA> | here:cm:carto-category:1999021599 |
4. Multilayer Bindings
4.1 Administrative boundary for a segment
This binding associates segment with administrative boundary.
Layer Ids - administrative-places , administrative-locations
segment_admin_boundary = hmc.segment_admin_boundary
types_to_df(segment_admin_boundary.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
segment_admin_boundary | here.content.hmc2.segment_admin_boundary.Segme... | True | False | segment, place |
df = segment_admin_boundary.get(17302684, "segment_admin_boundary")
df.head(2)
| segments | forward | backward | place_ref.partition | place_ref.identifier | place_name | admin_category | location.partition_id | location.location_id | location.location_type | ... | location.segment_anchor.oriented_segment_ref | location.segment_anchor.attribute_orientation | location.segment_anchor_side | location.accessors | location.political_geometry | location.alternate_geometry | location.within_location_ref.partition_name | location.within_location_ref.identifier | location.bounding_box | location.level_info |
partition_id | | | | | | | | | | | | | | | | | | | | | |
17302684 | [{'ref': {'partition': '17302684', 'identifier... | True | True | 23060936-27869540-27869541 | here:cm:namedplace:27869542 | [{'text': {'value': 'Chatham Islands', 'langua... | city | 23060936-27869540-27869541 | here:cm:namedplace-loc:27869542 | AREA | ... | [] | RELATIVE_DIRECTION_UNKNOWN | SIDE_UNKNOWN | <NA> | [] | [] | | | | |
17302684 | [{'ref': {'partition': '17302684', 'identifier... | True | True | 23060936-27869540-27869541 | here:cm:namedplace:27869549 | [{'text': {'value': '8016', 'language': ''}, '... | postal_code | 23060936-27869540-27869541 | here:cm:namedplace-loc:27869549 | AREA | ... | [] | RELATIVE_DIRECTION_UNKNOWN | SIDE_UNKNOWN | <NA> | [] | [] | | | | |
2 rows × 24 columns
df = segment_admin_boundary.get(17302684, "segment_admin_boundary")
df.head(2)
| segments | forward | backward | place_ref.partition | place_ref.identifier | place_name | admin_category | location.partition_id | location.location_id | location.location_type | ... | location.segment_anchor.oriented_segment_ref | location.segment_anchor.attribute_orientation | location.segment_anchor_side | location.accessors | location.political_geometry | location.alternate_geometry | location.within_location_ref.partition_name | location.within_location_ref.identifier | location.bounding_box | location.level_info |
partition_id | | | | | | | | | | | | | | | | | | | | | |
17302684 | [{'ref': {'partition': '17302684', 'identifier... | True | True | 23060936-27869540-27869541 | here:cm:namedplace:27869542 | [{'text': {'value': 'Chatham Islands', 'langua... | city | 23060936-27869540-27869541 | here:cm:namedplace-loc:27869542 | AREA | ... | [] | RELATIVE_DIRECTION_UNKNOWN | SIDE_UNKNOWN | <NA> | [] | [] | | | | |
17302684 | [{'ref': {'partition': '17302684', 'identifier... | True | True | 23060936-27869540-27869541 | here:cm:namedplace:27869549 | [{'text': {'value': '8016', 'language': ''}, '... | postal_code | 23060936-27869540-27869541 | here:cm:namedplace-loc:27869549 | AREA | ... | [] | RELATIVE_DIRECTION_UNKNOWN | SIDE_UNKNOWN | <NA> | [] | [] | | | | |
2 rows × 24 columns
segment_ref = make_ref("17302684", "here:cm:segment:499005300")
segment_admin_boundary_atts = segment_admin_boundary.get_referencing("17302684", "segment_admin_boundary",
"segment", segment_ref)
segment_admin_boundary_atts.head(2)
| partition_id | segments | forward | backward | place_ref.partition | place_ref.identifier | place_name | admin_category | location.partition_id | location.location_id | ... | location.segment_anchor.oriented_segment_ref | location.segment_anchor.attribute_orientation | location.segment_anchor_side | location.accessors | location.political_geometry | location.alternate_geometry | location.within_location_ref.partition_name | location.within_location_ref.identifier | location.bounding_box | location.level_info |
0 | 17302684 | [{'ref': {'partition': '17302684', 'identifier... | True | True | 23060936-27869540-27869541 | here:cm:namedplace:27869542 | [{'text': {'value': 'Chatham Islands', 'langua... | city | 23060936-27869540-27869541 | here:cm:namedplace-loc:27869542 | ... | [] | RELATIVE_DIRECTION_UNKNOWN | SIDE_UNKNOWN | <NA> | [] | [] | | | | |
1 | 17302684 | [{'ref': {'partition': '17302684', 'identifier... | True | True | 23060936-27869540-27869541 | here:cm:namedplace:27869549 | [{'text': {'value': '8016', 'language': ''}, '... | postal_code | 23060936-27869540-27869541 | here:cm:namedplace-loc:27869549 | ... | [] | RELATIVE_DIRECTION_UNKNOWN | SIDE_UNKNOWN | <NA> | [] | [] | | | | |
2 rows × 25 columns
place_ref = make_ref("23060936", "here:cm:namedplace:23060936")
place_admin_boundary_atts = segment_admin_boundary.get_referencing("17302684", "segment_admin_boundary",
"place", place_ref)
place_admin_boundary_atts
| partition_id | segments | forward | backward | place_ref.partition | place_ref.identifier | place_name | admin_category | location.partition_id | location.location_id | ... | location.segment_anchor.oriented_segment_ref | location.segment_anchor.attribute_orientation | location.segment_anchor_side | location.accessors | location.political_geometry | location.alternate_geometry | location.within_location_ref.partition_name | location.within_location_ref.identifier | location.bounding_box | location.level_info |
0 | 17302684 | [{'ref': {'partition': '17302684', 'identifier... | True | True | 23060936 | here:cm:namedplace:23060936 | [{'text': {'value': 'New Zealand', 'language':... | country | 23060936 | here:cm:namedplace-loc:23060936 | ... | [] | RELATIVE_DIRECTION_UNKNOWN | SIDE_UNKNOWN | <NA> | [] | [] | | | | |
1 rows × 25 columns
4.2 Environmental zones for a segment
This binding associates segment with environmental zones.
Layer Id - environmental_zones, navigation-attributes
ezc = hmc.environmental_zone_conditions
display(ezc)
<here.content.hmc2.environmental_zone_conditions.EnvironmentalZoneConditions at 0x7f569d02fe50>
types_to_df(ezc.object_types())
| Data Class | Index by partition | Index by ID | Ref Types |
Type | | | | |
segment_to_environmental_zone | here.content.hmc2.environmental_zone_condition... | True | False | location, segment |
data_ezc = ezc.get(partition = 23618402, object_type = 'segment_to_environmental_zone')
data_ezc.head(2)
| segment_ref.ref.partition | segment_ref.ref.identifier | segment_ref.inverted | segment_ref.offset.start | segment_ref.offset.end | forward | backward | applies_to.automobiles | applies_to.buses | applies_to.taxis | ... | zone.name | zone.info.description | zone.info.website.value | zone.info.website.language | zone.info.version_date | zone.info.extent_date | zone.info.country | zone.vehicle_class | zone.environmental_badge | zone.location_ref |
partition_id | | | | | | | | | | | | | | | | | | | | | |
23618402 | 23618402 | here:cm:segment:76338653 | False | 0.000000 | 0.289408 | True | True | True | True | True | ... | [{'text': {'value': 'Berlin Umweltzone', 'lang... | [{'value': 'Die Umweltzone der Stadt Berlin is... | https://www.berlin.de/senuvk/umwelt/luftqualit... | | 2019-05-09 | 2019-01-01 | GERMANY | [{'vehicle_attributes': {'category': 'AUTO', '... | [{'badge_type': 'DEU_GREEN_STICKER', 'zone_acc... | [{'partition': '23618400', 'identifier': 'here... |
23618402 | 23618402 | here:cm:segment:76338653 | False | 0.289408 | 0.545853 | True | True | True | True | True | ... | [{'text': {'value': 'Berlin Umweltzone', 'lang... | [{'value': 'Die Umweltzone der Stadt Berlin is... | https://www.berlin.de/senuvk/umwelt/luftqualit... | | 2019-05-09 | 2019-01-01 | GERMANY | [{'vehicle_attributes': {'category': 'AUTO', '... | [{'badge_type': 'DEU_GREEN_STICKER', 'zone_acc... | [{'partition': '23618400', 'identifier': 'here... |
2 rows × 29 columns
data_ezc.iloc[0]['zone.location_ref']
[{'partition': '23618400', 'identifier': 'here:cm:carto-loc:1415962522'}]
ref = make_ref(23618402, "here:cm:segment:92642459")
data = ezc.get_referencing(partition = 23618402,
object_type = 'segment_to_environmental_zone',
ref_type='segment',
referenced_obj=ref)
data
| partition_id | segment_ref.ref.partition | segment_ref.ref.identifier | segment_ref.inverted | segment_ref.offset.start | segment_ref.offset.end | forward | backward | applies_to.automobiles | applies_to.buses | ... | zone.name | zone.info.description | zone.info.website.value | zone.info.website.language | zone.info.version_date | zone.info.extent_date | zone.info.country | zone.vehicle_class | zone.environmental_badge | zone.location_ref |
0 | 23618402 | 23618402 | here:cm:segment:92642459 | False | 0.000000 | 0.517792 | True | True | True | True | ... | [{'text': {'value': 'Leipziger Strasse Dieself... | [{'value': 'Permanentes Durchfahrverbot in der... | https://www.berlin.de/special/auto-und-motor/n... | | 2020-01-29 | 2019-07-25 | GERMANY | [{'vehicle_attributes': {'category': 'TRUCK', ... | [{'badge_type': 'DEU_GREEN_STICKER', 'zone_acc... | <NA> |
1 | 23618402 | 23618402 | here:cm:segment:92642459 | False | 0.517792 | 1.000000 | True | True | True | True | ... | [{'text': {'value': 'Leipziger Strasse Dieself... | [{'value': 'Permanentes Durchfahrverbot in der... | https://www.berlin.de/special/auto-und-motor/n... | | 2020-01-29 | 2019-07-25 | GERMANY | [{'vehicle_attributes': {'category': 'TRUCK', ... | [{'badge_type': 'DEU_GREEN_STICKER', 'zone_acc... | <NA> |
2 rows × 30 columns
ref = make_ref(23618400, "here:cm:carto-loc:1415962522")
data = ezc.get_referencing(partition = 23618402,
object_type = 'segment_to_environmental_zone',
ref_type='location',
referenced_obj=ref)
data.head(2)
| partition_id | segment_ref.ref.partition | segment_ref.ref.identifier | segment_ref.inverted | segment_ref.offset.start | segment_ref.offset.end | forward | backward | applies_to.automobiles | applies_to.buses | ... | zone.name | zone.info.description | zone.info.website.value | zone.info.website.language | zone.info.version_date | zone.info.extent_date | zone.info.country | zone.vehicle_class | zone.environmental_badge | zone.location_ref |
0 | 23618402 | 23618402 | here:cm:segment:76338653 | False | 0.000000 | 0.289408 | True | True | True | True | ... | [{'text': {'value': 'Berlin Umweltzone', 'lang... | [{'value': 'Die Umweltzone der Stadt Berlin is... | https://www.berlin.de/senuvk/umwelt/luftqualit... | | 2019-05-09 | 2019-01-01 | GERMANY | [{'vehicle_attributes': {'category': 'AUTO', '... | [{'badge_type': 'DEU_GREEN_STICKER', 'zone_acc... | [{'partition': '23618400', 'identifier': 'here... |
1 | 23618402 | 23618402 | here:cm:segment:76338653 | False | 0.289408 | 0.545853 | True | True | True | True | ... | [{'text': {'value': 'Berlin Umweltzone', 'lang... | [{'value': 'Die Umweltzone der Stadt Berlin is... | https://www.berlin.de/senuvk/umwelt/luftqualit... | | 2019-05-09 | 2019-01-01 | GERMANY | [{'vehicle_attributes': {'category': 'AUTO', '... | [{'badge_type': 'DEU_GREEN_STICKER', 'zone_acc... | [{'partition': '23618400', 'identifier': 'here... |
2 rows × 30 columns
data_ezc.iloc[0]
segment_ref.ref.partition 23618402
segment_ref.ref.identifier here:cm:segment:76338653
segment_ref.inverted False
segment_ref.offset.start 0.0
segment_ref.offset.end 0.289408
forward True
backward True
applies_to.automobiles True
applies_to.buses True
applies_to.taxis True
applies_to.carpools True
applies_to.trucks True
applies_to.through_traffic True
applies_to.deliveries True
applies_to.pedestrians False
applies_to.emergency_vehicles False
applies_to.motorcycles False
applies_to.bicycles False
zone.identifier here:cm:envzone:2
zone.name [{'text': {'value': 'Berlin Umweltzone', 'lang...
zone.info.description [{'value': 'Die Umweltzone der Stadt Berlin is...
zone.info.website.value https://www.berlin.de/senuvk/umwelt/luftqualit...
zone.info.website.language
zone.info.version_date 2019-05-09
zone.info.extent_date 2019-01-01
zone.info.country GERMANY
zone.vehicle_class [{'vehicle_attributes': {'category': 'AUTO', '...
zone.environmental_badge [{'badge_type': 'DEU_GREEN_STICKER', 'zone_acc...
zone.location_ref [{'partition': '23618400', 'identifier': 'here...
Name: 23618402, dtype: object
4.3 Speed limit from navigation and advanced navigation attributes layers
This binding combines speedlimit from navigation and advanced navigation attributes layers. Advanced navigation attributes layers is premium content thus the access is restricted.
Layer Id - navigation-attributes, advanced-navigation-attributes
speed_limits = hmc.extended_speed_limit
speed_limits
<here.content.hmc2.extended_speed_limit.ExtendedSpeedLimit at 0x7f569d02fca0>
extended_speed_limit = speed_limits.get("17434043", "extended_speed_limit")
extended_speed_limit
| segment_ref.ref.partition | segment_ref.ref.identifier | segment_ref.inverted | segment_ref.offset.start | segment_ref.offset.end | forward | backward | speed_limit | source | unlimited |
partition_id | | | | | | | | | | |
17434043 | 17434043 | here:cm:segment:216802488 | False | 0.614832 | 1.0 | True | False | 20 | POSTED | False |
17434043 | 17434043 | here:cm:segment:216802488 | False | 0.614832 | 1.0 | False | True | 20 | POSTED | False |
17434043 | 17434043 | here:cm:segment:216507507 | False | 0.635647 | 1.0 | True | False | 40 | POSTED | False |
17434043 | 17434043 | here:cm:segment:216507507 | False | 0.635647 | 1.0 | False | True | 40 | POSTED | False |
segment_ref = make_ref("17434043", "here:cm:segment:216802488")
extended_speed_limit_attrs = speed_limits.get_referencing("17434043", "extended_speed_limit", "segment", segment_ref
)
extended_speed_limit_attrs
| partition_id | segment_ref.ref.partition | segment_ref.ref.identifier | segment_ref.inverted | segment_ref.offset.start | segment_ref.offset.end | forward | backward | speed_limit | source | unlimited |
0 | 17434043 | 17434043 | here:cm:segment:216802488 | False | 0.614832 | 1.0 | True | False | 20 | POSTED | False |
1 | 17434043 | 17434043 | here:cm:segment:216802488 | False | 0.614832 | 1.0 | False | True | 20 | POSTED | False |
4.4 Street name for a segment
This binding associates segment with administrative boundary.
Layer Id - navigation-attributes, Street Names
segment_street_names = hmc.segment_street_names
segment_street = segment_street_names.get(["20371958","17434043"], "street_section")
segment_street.head(2)
| segments | forward | backward | attribute.side | attribute.property | attribute.street_section |
0 | [{'ref': {'partition': '20371958', 'identifier... | True | True | BOTH_SIDES | [] | StreetSection(partition_id='20317122-23489553'... |
1 | [{'ref': {'partition': '20371958', 'identifier... | True | True | BOTH_SIDES | [] | StreetSection(partition_id='20317122-23489553'... |
segment_street = segment_street_names.get(["20371958","17434043"], "address_range")
segment_street.head(2)
| segments | forward | backward | attribute.address_range_type | attribute.format | attribute.side | attribute.postal_mapping | attribute.address_type | attribute.scheme | attribute.first_house_number | attribute.last_house_number | attribute.street_section |
0 | [{'ref': {'partition': '20371958', 'identifier... | True | True | LOGICAL | UNADDRESSED | LEFT_SIDE | [{'match_category': 'ADDRESS_RANGE_MATCH', 'fi... | BASE | ADDRESS_SCHEME_UNKNOWN | | | [StreetSection(partition_id='20317122-23489553... |
1 | [{'ref': {'partition': '20371958', 'identifier... | True | True | LOGICAL | UNADDRESSED | LEFT_SIDE | [{'match_category': 'ADDRESS_RANGE_MATCH', 'fi... | BASE | ADDRESS_SCHEME_UNKNOWN | | | [StreetSection(partition_id='20317122-23489553... |
5. Download notebook
To run the notebook on your local machine, please refer to link below.
url = os.path.abspath("")
notebook_name = 'hmc.ipynb'
notebook = FileLink(f"{url}/{notebook_name}", result_html_prefix="Click here to download: ")
display(notebook)
Click here to download: /builds/sdk/pysdk-nagini/dev_guide/notebooks/hmc.ipynb