Layers, Indexes, and Attributes
The Platform Data Extension API offers HERE map data in a series of attribute key/value pairs (for example,
iso_country_code": "DEU" is an attribute in the
LINK_ATTRIBUTE_FC3 that specifies the ISO A3 country code for a link as a key/value pair – Germany in this case). The attributes in the system are grouped in layers. The Platform Data Extension API also contains attribute key/value pairs that are independent of locations. The Platform Data Extension API refers to these attributes as static content, which are in static layers.
Some map data attributes are also indexed, which allows you to request which tiles contain specific values in attribute key/value pairs.
- layers that display warnings to the driver
- layers that provide Junction View guidance
- layers that enable fuel efficient driving
- layers that enable safe driving
- layers that provide access to polygons that describe the hierarchy of administrative regions
A typical example for using layers is when you need to retrieve information along a particular route. A route usually starts on smaller roads, follows bigger roads, then stays on motorway-like roads for the main part of the journey, and finally returns onto smaller roads when approaching the destination. Retrieving all the information about smaller roads along the whole route can result in an overwhelming amount of data transfer. Therefore, road link related layers are split into five layers each corresponding to the functional classes used in HERE maps. For more information about the terminology used in HERE maps and Platform Data Extension API responses, see Working with HERE Map Data. To keep the data processing simple, each layer consists of a single flat table with simple records in numbers or text strings represented as attribute key/value pairs.
To reduce the volume of data transferred, some columns are denormalized or encoded. Denormalization is done by storing a list of comma separated values in a column. Encoding is done by using abbreviations or numbers to represent static string values, bit mask for a vehicle's type, and so on. For example, each geometry is delivered in a single column per coordinate (x, y, z-level columns). Each coordinate is a comma separated list of integer values in 10E-5 WGS degrees (or 10E-7 for ADAS accuracy). The first value is absolute. Each subsequent value is relative to the previous value; a 0 value is reduced to an empty string.
While the flat text file format is suitable for HERE core map data, it is not suitable for pixel images like Junction Views. For this type of map content, the flat file data contains a file path.
To retrieve the content itself through the Platform Data Extension API, you can use the
path parameter after the
layer paraneter. The path information is published for tiled or static layers, if they can be enhanced with external file data, such as Junction View SVGs. For an example of a file request, see Requesting a Data File.
If you only use a map object ID (Link ID, Admin Place ID), you can use the available indexes to retrieve the tile IDs (tileX, TileY, level) for specific map object IDs.
For example, to find out which tiles from the Link Attribute layers you have to request to get information for the following link IDs: (555, 666, 777), you make an index request on the Road Geometry layer with
values=555,666,777. The response then contains the Road Geometry tile IDs covering these links. Alternatively, you can also request the same tile IDs from the Link Attribute layer on the same level.
You can use the tileX, tileY numbers from the response to request tiles from any layer, as long as they are on the same level.
indexresource returns (layer, level, tileX, TileY). If your application needs to know the spatial boundary of a tile, you can compute it using this formula:
tileMinLat = tileY * tileSize - 90.0; tileMinLon = tileX * tileSize - 180.0; tileMaxLat = tileMinLat + tileSize - 0.00001; tileMaxLon = tileMinLon + tileSize - 0.00001; where tileSize = 180 / (2level).
Static layers contain static content in small tables, that you can retrieve as a whole. These tables contain information that is referenced in tiles that belong to other layers.
For example, records in the Traffic Pattern layer contain a
PATTERN_ID. A static layer table contains the full specification for each
PATTERN_ID. For an example of a static content request, see Requesting General System Data