Read and Visualize HERE HD Live Map Data
HERE HD Live Map 1 (HERE HDLM), developed by HERE Technologies, is a cloud-based web service that enables you to access highly accurate, continuously updated map data. The data is composed of tiled map layers containing information such as the topology and geometry of roads and lanes, road-level attributes and lane-level attributes, and the barriers, signs, and poles found along roads. This data is suitable for a variety of advanced driver assistance system (ADAS) applications, including localization, scenario generation, navigation, and path planning.
Using Automated Driving Toolbox™ functions and objects, you can configure and create a HERE HDLM reader, read map data from the HERE HDLM web service, and then visualize the data from certain layers.
Before you can use the HERE HDLM web service, you must enter the credentials that you
obtained from your agreement with HERE Technologies. To set up your credentials, use the
Enter a valid Access Key ID and Access Key Secret, and click OK. The credentials are saved for the rest of your MATLAB® session on your machine. To save your credentials for future MATLAB sessions on your machine, in the dialog box, select Save my credentials between MATLAB sessions. These credentials remain saved until you delete them.
Configure Reader to Search Specific Catalog
In the HERE HDLM web service, map data is stored in a set of databases called
catalogs. Each catalog roughly corresponds to a
different geographic region, such as North America or Western Europe. By creating a
hereHDLMConfiguration object, you can configure a HERE HDLM reader to
search for map data from only a specific catalog. You can also optionally specify the
version of the catalog that you want to search. These configurations can speed up the
performance of the reader, because the reader does not search unnecessary catalogs for
For example, create a configuration for the catalog that roughly corresponds to the North America region.
config = hereHDLMConfiguration('hrn:here:data::olp-here-had:here-hdlm-protobuf-na-2');
Readers created with this configuration search for map data from only the specified catalog.
Configuring a HERE HDLM reader is optional. If you do not specify a configuration, the reader defaults to searching for map tiles across all catalogs. The reader returns map data from the latest version of the catalog in which those tiles were found.
Create Reader for Specific Map Tiles
hereHDLMReader object reads HERE HDLM data from a selection of map tiles.
By default, these map tiles are set to a zoom level of 14, which corresponds to a
rectangular area of about 5–10 square kilometers.
You select the map tiles from which to read data when you create a
hereHDLMReader object. You can specify the map tile IDs directly.
Alternatively, you can specify the coordinates of a driving route and read data from the
map tiles of that route.
Load the latitude-longitude coordinates for a driving route in North America. For reference, display the route on a geographic axes.
route = load('geoSequenceNatickMA.mat'); lat = route.latitude; lon = route.longitude; geoplot(lat,lon,'bo-') geobasemap('streets') title('Driving Route')
hereHDLMReader object using the specified driving route and
reader = hereHDLMReader(lat,lon,'Configuration',config);
For more details on the layers in these models, see HERE HD Live Map Layers.
Read Map Layer Data
function reads data for the selected map tiles. The map data is returned as a series of
layer objects. Read data from the layer containing the topology geometry of the
topology = read(reader,'TopologyGeometry')
topology = 2×1 TopologyGeometry array with properties: Data: HereTileId IntersectingLinkRefs LinksStartingInTile NodesInTile TileCenterHere2dCoordinate Metadata: Catalog CatalogVersion
Each map layer object corresponds to a map tile that you selected using the input
hereHDLMReader object. The IDs of these map tiles are stored in the
TileIds property of the reader. Inspect the properties of the
map layer object for the first map tile. Your catalog version and map data might differ
from what is shown here.
ans = TopologyGeometry with properties: Data: HereTileId: 321884279 IntersectingLinkRefs: [42×1 struct] LinksStartingInTile: [905×1 struct] NodesInTile: [635×1 struct] TileCenterHere2dCoordinate: [42.3083 -71.3782] Metadata: Catalog: 'hrn:here:data::olp-here-had:here-hdlm-protobuf-na-2' CatalogVersion: 3321
The properties of the
TopologyGeometry layer object correspond to
valid HERE HDLM fields for that layer. In these layer objects, the names of the layer
fields are modified to fit the MATLAB naming convention for object properties. For more details about the layer
objects, see the
layerData output argument description on the
function reference page.
Visualize Map Layer Data
To visualize the data of map layers, use the
function. Plot the topology geometry of the returned map layers. The plot shows the
boundaries, nodes (intersections and dead-ends), and links (streets) within the map
tiles. If a link extends outside the boundaries of the specified map tiles, the layer
data includes that link.
Map layer plots are returned on a geographic axes. To customize map displays, you can use the properties of the geographic axes. For more details, see GeographicAxes Properties. Overlay the driving route on the plot.
hold on geoplot(lat,lon,'bo-','DisplayName','Route') hold off
1 You need to enter into a separate agreement with HERE in order to gain access to the HDLM services and to get the required credentials (access_key_id and access_key_secret) for using the HERE Service.