You can read map tile data from the HERE HD Live Map
(HERE HDLM) web service by using a
object and the
function. This data is composed of a series of map layer objects. The diagram shows the
layers available for map tiles corresponding to a driving route in North America.
You can use this map layer data for a variety of automated driving applications. You can
also visualize certain layers by using the
To read map data using the
read function, you must specify a
hereHDLMReader object as an input argument. This object specifies
the map tiles from which you want to read data.
hereHDLMReader object that can read data from the map tiles
of a driving route in North America. Configure the reader to read data from only the
North America catalog by specifying a
hereHDLMConfiguration object for the
property of the reader. If you have not previously entered HERE HDLM credentials, a
dialog box prompts you to enter them. For reference, display the driving route on a
route = load('geoSequenceNatickMA.mat'); lat = route.latitude; lon = route.longitude; config = hereHDLMConfiguration('North America'); reader = hereHDLMReader(lat,lon,'Configuration',config); geoplot(lat,lon,'bo-'); geobasemap('streets') title('Driving Route')
To read map layer data from the HERE HDLM web service, call the
read function with the reader you created in the previous
section and the name of the map layer you want to read. For example, read data from the
layer containing the topology geometry of the road. The data is returned as an array of
map layer objects.
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 HERE HDLM reader.
Inspect the properties of the map layer object for the first map tile. Your catalog version might differ from the one shown here.
ans = TopologyGeometry with properties: Data: HereTileId: 321884279 IntersectingLinkRefs: [38×1 struct] LinksStartingInTile: [490×1 struct] NodesInTile: [336×1 struct] TileCenterHere2dCoordinate: [42.3083 -71.3782] Metadata: Catalog: 'here-hdmap-ext-na-1' CatalogVersion: 2066
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 each layer field name, the
first letter and first letter after each underscore are capitalized and the underscores
are removed. This table shows sample name changes.
|HERE HDLM Layer Fields||MATLAB Layer Object Property|
The layer objects are MATLAB structures whose properties correspond to structure
fields. To access data from these fields, use dot notation. For example, this code
NodeId subfield from the
NodeAttribution field of a
This table summarizes the valid types of layer objects and their top-level data fields. The available layers are for the Road Centerline Model and HD Lane Model. For an overview of HERE HDLM layers and the models that they belong to, see HERE HD Live Map Layers.
|Layer Object||Description||Top-Level Data Fields (Layer Object Properties)||Plot Support|
Precision geometry measurements, such as slope, elevation, and curvature of roads. Use this data to develop advanced driver assistance systems (ADAS).
References to external map links, nodes, and topologies for other HERE maps.
Lane-level attributes, such as direction of travel and lane type.
3-D lane geometry composed of a set of 3-D points joined into polylines.
Available — Use the
Road and lane group references and range information. Use this data to translate positions between the Road Centerline Model and the HD Lane Model.
Topologies of the HD Lane model, including lane group, lane group connector, lane, and lane connector topologies. This layer also contains the simplified 2-D boundary geometry of the lane model for determining map tile affinity and overflow.
Available — Use the
Road attributes related to navigation and conditions. These attributes are mapped parametrically to the 2-D polyline geometry in the topology layer.
Core navigation lane attributes and conditions, such as the number of lanes in a road. These values are mapped parametrically to 2-D polylines along the road links.
Speed-related road attributes, such as speed limits. These attributes are mapped to the 2-D polyline geometry of the topology layer.
Topology and 2-D line geometry of the road. This layer also contains definitions of the nodes and links in the map tile.
Available — Use the
You can visualize the data of certain map layers. To visualize these 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 past the tile boundary, the layer data includes that
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
 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.