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.
enter credentials
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 function.
herehdlmcredentials setup
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 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 map data.
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
the 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')
create a herehdlmreader
object using the specified driving route and
configuration.
reader = herehdlmreader(lat,lon,'configuration',config);
for more details on the layers in these models, see .
read map layer data
the 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 road.
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.
topology(1)
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 output argument description on the read
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.
plot(topology)
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 . overlay the driving route on the plot.
hold on geoplot(lat,lon,'bo-','displayname','route') hold off
see also
| | | |
related topics
1 you need to enter into a separate agreement with 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.