DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

maps/docs/usecase7.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
2 
3 @page maps_usecase7 Importing Custom Maps Data
4 
5 @note SW Release Applicability: This tutorial is applicable to modules in **NVIDIA DRIVE Software** releases.
6 
7 Custom map data can be imported into DriveWorks by writing an xml map cache file with the custom data in DriveWorks format and providing it to the dwMapProvider_initializeWithCacheFile() function.
8 
9 @section maps_usecase7_xml XML Format
10 
11 The format of the xml serialization file reflects the structs and their entries of the DriveWorks Maps API, see @ref maps_datastructs_group. All maps data is contained within a list of dwMapsRoadSegments.
12 
13 Each struct entity is represented by an xml node of the same or similar name. For example a `<roadSegment>` node represents a dwMapsRoadSegment. Its content, e.g. the `id` member as `<roadSegmentId>`, is listed within the node, in this example between `<roadSegment>` and `</roadSegment>`. To represent lists of entities, there is a list node the encloses all entities, so e.g. all `<roadSegment>` nodes are held by a `<roadSegments>` node.
14 
15 The root node is called `<dwMap>` and has a version attribute, e.g. `<dwMap version="2">`. The exact version number that is defined in Maps.h @ref DW_MAPS_SERIALIZATION_FORMAT_XML_VERSION must be used.
16 
17 Enum entries are stored as their integer value. Boolean `false` is represented as `0`, `true` as `1`. A 3D point is written as a `<point>` node containing three values, separated by spaces. Similarly for matrices, the values are listed and separated by spaces, the order is row-major.
18 
19 For the exact structure and node names, please refer to the `dwMaps.xsd` file in the `data/hdmaps` directory of the DriveWorks SDK. Also, as a reference, an existing DriveWorks maps file can be loaded and deserialized to a corresponding .xml file using dwMaps_serialize() API.
20 
21 For more details on how to fill out the nodes corresponding to the various maps structs and their fields, please refer to the doxygen documentation of those API structs, see @ref maps_datastructs_group.