DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Importing Custom Maps Data
Note
SW Release Applicability: This tutorial is applicable to modules in NVIDIA DRIVE Software releases.

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.

XML Format

The format of the xml serialization file reflects the structs and their entries of the DriveWorks Maps API, see Structs for Map Data. All maps data is contained within a list of dwMapsRoadSegments.

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.

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 DW_MAPS_SERIALIZATION_FORMAT_XML_VERSION must be used.

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.

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.

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 Structs for Map Data.