Read and Visualize Data Using HERE HD Live Map Reader

You can read map tile data from the HERE HD Live Map[1] (HERE HDLM) web service by using a hereHDLMReader object and the read 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 plot function.

Create Reader

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.

Create a 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 Configuration 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 geographic axes.

route = load(fullfile(matlabroot,'examples','driving','geoSequenceNatickMA.mat'));
lat = route.latitude;
lon = route.longitude;
config = hereHDLMConfiguration('North America');
reader = hereHDLMReader(lat,lon,'Configuration',config);

title('Driving Route')

For more details about configuring a HERE HDLM reader, see Create Configuration for HERE HD Live Map Reader. For more details about creating a reader, see Create HERE HD Live Map Reader.

Read Map Layer Data

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:



Each map layer object corresponds to a map tiles 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:

                    HereTileId: 321884279
          IntersectingLinkRefs: [38×1 struct]
           LinksStartingInTile: [490×1 struct]
                   NodesInTile: [336×1 struct]
    TileCenterHere2dCoordinate: [42.3083 -71.3782]

                       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 FieldsMATLAB 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 selects the NodeId subfield from the NodeAttribution field of a layer:


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. For a full description of the fields, see HD Live Map Data Specification on the HERE Technologies website.

Layer ObjectDescriptionTop-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).

  • HereTileId

  • LinkAttribution

  • NodeAttribution

Not available


References to external map links, nodes, and topologies for other HERE maps.

  • HereTileId

  • LinkAttribution

  • NodeAttribution

Not available


Lane-level attributes, such as direction of travel and lane type.

  • HereTileId

  • LaneGroupAttribution

Not available


3-D lane geometry composed of a set of 3-D points joined into polylines.

  • HereTileId

  • TileCenterHere3dCoordinate

  • LaneGroupGeometries

Available — Use the plot function.


Road and lane group references and range information. Use this data to translate positions between the Road Centerline Model and the HD Lane Model.

  • HereTileId

  • LaneGroupLinkReferences

  • LinkLaneGroupReferences

Not available


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.

  • HereTileId

  • TileCenterHere2dCoordinate

  • LaneGroupsStartingInTile

  • LaneGroupConnectorsInTile

  • IntersectingLaneGroupRefs

Available — Use the plot function.


Road attributes related to navigation and conditions. These attributes are mapped parametrically to the 2-D polyline geometry in the topology layer.

  • HereTileId

  • LinkAttribution

  • NodeAttribution

  • StrandAttribution

  • AttributionGroupList

Not available


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.

  • HereTileId

  • LinkAttribution

Not available


Speed-related road attributes, such as speed limits. These attributes are mapped to the 2-D polyline geometry of the topology layer.

  • HereTileId

  • LinkAttribution

Not available


Topology and 2-D line geometry of the road. This layer also contains definitions of the nodes and links in the map tile.

  • HereTileId

  • TileCenterHere2dCoordinate

  • NodesInTile

  • LinksStartingInTile

  • IntersectingLinkRefs

Available — Use the plot function.

Visualize Map Layer Data

You can visualize the data of certain map layers. To visualize these layers, use the plot 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 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
hold off

See Also

| |

Related Topics

External Websites

[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 (app_id and app_code) for using the HERE Service.