Create HERE HD Live Map Reader

A hereHDLMReader object reads HERE HD Live Map[1] (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, or you can specify a driving route and read data from the map tiles of that route.

Create Reader from Specified Driving Route

If you have a driving route stored as a vector of latitude-longitude coordinates, you can use these coordinates to select map tiles from which to read data.

Load the latitude-longitude coordinates for a driving route in North America. For reference, display the route on a geographic axes.

route = load(fullfile(matlabroot,'examples','driving','geoSequenceNatickMA.mat'));
lat = route.latitude;
lon = route.longitude;

geoplot(lat,lon,'bo-');
geobasemap('streets')
title('Driving Route')

Create a hereHDLMConfiguration object for reading data from only the North America catalog. For more details about configuring HERE HDLM readers, see Create Configuration for HERE HD Live Map Reader. If you have not previously set up HERE HDLM credentials, a dialog box prompts you to enter them.

config = hereHDLMConfiguration('North America');

Create a hereHDLMReader object using the specified driving route and configuration.

reader = hereHDLMReader(lat,lon,'Configuration',config);
This HERE HDLM reader enables you to read map data for the tiles that the driving route is on. The map data is stored in a set of layers containing detailed information about various aspects of the map. The reader supports reading data from the map layers for the Road Centerline Model and HD Lane Model. For more details on the layers in these models, see HERE HD Live Map Layers.

If you call the read function with the HERE HDLM reader, you can read the map tile data for a specific layer. If the layer supports visualization, you can also plot the layer. For more details, see Read and Visualize Data Using HERE HD Live Map Reader.

Create Reader from Specified Map Tile IDs

If you know the IDs of the map tiles from which you want to read data, when you create a hereHDLMReader object, you can specify the map tile IDs directly. Specify the map tile IDs as an array of unsigned 32-bit integers.

Create a hereHDLMReader object using the map tile IDs and configuration from the previous section.

tileIds = uint32([321884279 321884450]);
reader = hereHDLMReader(tileIds);

This reader is equivalent to the reader created in the previous section. The only difference between these two readers is the method for selecting the map tiles from which to read data.

To learn more about reading and plotting data from map tiles, see Read and Visualize Data Using HERE HD Live Map Reader.

See Also

| |

Related Topics


[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.