DriveWorks SDK Reference

| 0.6.67 Release

Maps.h File Reference

Detailed Description

NVIDIA DriveWorks API: Maps

Description: This file defines the API of the driveworks maps module.

Definition in file Maps.h.

Go to the source code of this file.

Data Structures

struct  dwMapsBounds
 Map coordinate bounds. More...
 
struct  dwMapsFeature
 Road feature defined by a polyline, with attributes. More...
 
struct  dwMapsFeatureBuffer
 User provided buffer of dwMapsFeatures. More...
 
struct  dwMapsGeoPoint
 Point defined by WGS84 coordinates. More...
 
struct  dwMapsGeoPointBuffer
 User provided buffer of dwMapsGeoPoint. More...
 
struct  dwMapsGeoPolyline
 Polyline defined by a dwMapsGeoPoint list. More...
 
struct  dwMapsHEREConnectionParameters
 Connection parameters to HERE database. More...
 
struct  dwMapsLane
 Lane defined by a polyline, with lane attributes. More...
 
struct  dwMapsLaneBuffer
 User provided buffer of dwMapsLane. More...
 
struct  dwMapsLaneConnection
 Lane connection. More...
 
struct  dwMapsLaneDivider
 Lane divider defined by a polyline, with type, material and color information. More...
 
struct  dwMapsLaneDividerBuffer
 User provided buffer of dwMapsLaneDividers. More...
 
struct  dwMapsLaneDividerGroup
 Group of lane dividers, representing one boundary of a lane. More...
 
struct  dwMapsLaneDividerGroupId
 Global identifier for lane divider groups. More...
 
struct  dwMapsLaneDividerLine
 Lane divider line defined by two points and the owner of a line. More...
 
struct  dwMapsLaneDividerLineBuffer
 User provided buffer of dwMapsLines. More...
 
struct  dwMapsLaneId
 Global identifier for lanes. More...
 
struct  dwMapsLaneTreeNode
 Lane Tree Node. More...
 
struct  dwMapsLaneTreeNodeBuffer
 User provided buffer of dwMapsLaneTreeNode. More...
 
struct  dwMapsLine
 Line defined by 2 points in user defined coordinates. More...
 
struct  dwMapsLocalBounds
 Local coordinate bounds. More...
 
struct  dwMapsPointBuffer
 User provided buffer of dwVector3f. More...
 
struct  dwMapsPolyline3fBuffer
 User provided buffer of dwPolyline3f. More...
 
struct  dwMapsRoadSegment
 Road segment representing a piece of the road. More...
 
struct  dwMapsRoadSegmentBuffer
 User provided buffer of dwMapsRoadSegments. More...
 
struct  dwMapsRoadSegmentConnection
 Road segment connection. More...
 
struct  dwMapsRoadSegmentId
 Global identifier for road segments. More...
 

Macros

#define DW_MAPS_MAX_LANE_CONNECTIONS   100
 

Typedefs

typedef struct dwMapObject const * dwConstMapHandle_t
 
typedef struct dwMapsLaneTreeObject const * dwConstMapsLaneTreeHandle_t
 
typedef struct dwMapTrackerObject const * dwConstMapTrackerHandle_t
 
typedef struct dwMapObject * dwMapHandle_t
 
typedef struct dwMapsLaneTreeObject * dwMapsLaneTreeHandle_t
 
typedef struct dwMapTrackerObject * dwMapTrackerHandle_t
 

Enumerations

enum  dwMapsColor {
  DW_MAPS_COLOR_UNKNOWN = 1 << 0,
  DW_MAPS_COLOR_WHITE = 1 << 1,
  DW_MAPS_COLOR_LIGHT_GRAY = 1 << 2,
  DW_MAPS_COLOR_GRAY = 1 << 3,
  DW_MAPS_COLOR_DARK_GRAY = 1 << 4,
  DW_MAPS_COLOR_BLACK = 1 << 5,
  DW_MAPS_COLOR_RED = 1 << 6,
  DW_MAPS_COLOR_YELLOW = 1 << 7,
  DW_MAPS_COLOR_GREEN = 1 << 8,
  DW_MAPS_COLOR_CYAN = 1 << 9,
  DW_MAPS_COLOR_BLUE = 1 << 10,
  DW_MAPS_COLOR_ORANGE = 1 << 11
}
 Colors. More...
 
enum  dwMapsDirection {
  DW_MAPS_DIRECTION_FORWARD = 1 << 0,
  DW_MAPS_DIRECTION_BACKWARD = 1 << 1,
  DW_MAPS_DIRECTION_BOTH = 1 << 2,
  DW_MAPS_DIRECTION_NONE = 1 << 3
}
 Direction compared to geometry (polyline order) More...
 
enum  dwMapsFeatureType {
  DW_MAPS_FEATURE_UNKNOWN = 0,
  DW_MAPS_FEATURE_TRAFFIC_SIGN = 1 << 16,
  DW_MAPS_FEATURE_TRAFFIC_LIGHT = 1 << 17,
  DW_MAPS_FEATURE_LANE_MARK = 1 << 18
}
 Feature types. More...
 
enum  dwMapsLaneDividerType {
  DW_MAPS_LANE_DIVIDER_TYPE_INVISIBLE = 1 << 0,
  DW_MAPS_LANE_DIVIDER_TYPE_LONG_DASHED = 1 << 1,
  DW_MAPS_LANE_DIVIDER_TYPE_DOUBLE_SOLID = 1 << 2,
  DW_MAPS_LANE_DIVIDER_TYPE_SINGLE_SOLID = 1 << 3,
  DW_MAPS_LANE_DIVIDER_TYPE_SOLID_DASHED = 1 << 4,
  DW_MAPS_LANE_DIVIDER_TYPE_DASHED_SOLID = 1 << 5,
  DW_MAPS_LANE_DIVIDER_TYPE_SHORT_DASHED = 1 << 6,
  DW_MAPS_LANE_DIVIDER_TYPE_SHADED_AREA = 1 << 7,
  DW_MAPS_LANE_DIVIDER_TYPE_DASHED_BLOCKS = 1 << 8,
  DW_MAPS_LANE_DIVIDER_TYPE_DOUBLE_DASHED = 1 << 9,
  DW_MAPS_LANE_DIVIDER_TYPE_CROSSING_ALERT = 1 << 10,
  DW_MAPS_LANE_DIVIDER_TYPE_CENTER_TURN_LANE = 1 << 12,
  DW_MAPS_LANE_DIVIDER_TYPE_PHYSICAL = 1 << 13,
  DW_MAPS_LANE_DIVIDER_TYPE_CURB = 1 << 14,
  DW_MAPS_LANE_DIVIDER_TYPE_WALL_FLAT = 1 << 15,
  DW_MAPS_LANE_DIVIDER_TYPE_WALL_TUNNEL = 1 << 16,
  DW_MAPS_LANE_DIVIDER_TYPE_BARRIER_JERSEY = 1 << 17,
  DW_MAPS_LANE_DIVIDER_TYPE_BARRIER_SOUND = 1 << 18,
  DW_MAPS_LANE_DIVIDER_TYPE_BARRIER_CABLE = 1 << 19,
  DW_MAPS_LANE_DIVIDER_TYPE_GUARDRAIL = 1 << 20,
  DW_MAPS_LANE_DIVIDER_TYPE_FENCE = 1 << 21,
  DW_MAPS_LANE_DIVIDER_TYPE_RUBBER_POLE = 1 << 22,
  DW_MAPS_LANE_DIVIDER_TYPE_ROAD_STUDS = 1 << 23,
  DW_MAPS_LANE_DIVIDER_TYPE_ROAD_EDGE = 1 << 24,
  DW_MAPS_LANE_DIVIDER_TYPE_ALL = (1u << 25) - 1u
}
 Lane divider type and filter values. More...
 
enum  dwMapsLaneGeometry {
  DW_MAPS_LANE_GEOMETRY_LANEDIVIDERRIGHT = 0,
  DW_MAPS_LANE_GEOMETRY_LANEDIVIDERLEFT = 1,
  DW_MAPS_LANE_GEOMETRY_LANECENTER = 2
}
 Enum for selection of lane geometry. More...
 
enum  dwMapsLaneTreeLimit {
  DW_MAPS_LANE_TREE_LIMIT_DISTANCE = 0,
  DW_MAPS_LANE_TREE_LIMIT_TIME = 1
}
 Enum to select the lane tree limit type. More...
 
enum  dwMapsLaneType {
  DW_MAPS_LANE_TYPE_REGULAR = 1 << 0,
  DW_MAPS_LANE_TYPE_SHOULDER = 1 << 1,
  DW_MAPS_LANE_TYPE_DRIVABLE_SHOULDER = 1 << 2,
  DW_MAPS_LANE_TYPE_CAR_POOL = 1 << 3,
  DW_MAPS_LANE_TYPE_ENTRY = 1 << 4,
  DW_MAPS_LANE_TYPE_EXIT = 1 << 5,
  DW_MAPS_LANE_TYPE_CONNECT = 1 << 6,
  DW_MAPS_LANE_TYPE_EMERGENCY = 1 << 7,
  DW_MAPS_LANE_TYPE_STOP = 1 << 8,
  DW_MAPS_LANE_TYPE_EMERGENCY_STOP = 1 << 9,
  DW_MAPS_LANE_TYPE_ACCELERATE = 1 << 10,
  DW_MAPS_LANE_TYPE_DECELERATE = 1 << 11,
  DW_MAPS_LANE_TYPE_AVOID_DANGER = 1 << 12,
  DW_MAPS_LANE_TYPE_INTERSECTION = 1 << 13,
  DW_MAPS_LANE_TYPE_TOLL_GATE = 1 << 14,
  DW_MAPS_LANE_TYPE_CHECK_POINT = 1 << 15,
  DW_MAPS_LANE_TYPE_TURN_AROUND = 1 << 16,
  DW_MAPS_LANE_TYPE_FORMING = 1 << 17,
  DW_MAPS_LANE_TYPE_DESTROY = 1 << 18,
  DW_MAPS_LANE_TYPE_RAMP = 1 << 19
}
 Lane types. More...
 
enum  dwMapsMaterial {
  DW_MAPS_MATERIAL_UNKNOWN = 1 << 0,
  DW_MAPS_MATERIAL_METAL = 1 << 1,
  DW_MAPS_MATERIAL_CONCRETE = 1 << 2,
  DW_MAPS_MATERIAL_STONE = 1 << 3,
  DW_MAPS_MATERIAL_WOOD = 1 << 4,
  DW_MAPS_MATERIAL_PLASTIC = 1 << 5,
  DW_MAPS_MATERIAL_TRANSPARENT = 1 << 6,
  DW_MAPS_MATERIAL_PAINT = 1 << 7,
  DW_MAPS_MATERIAL_BOTTS_DOT = 1 << 8
}
 Material type values. More...
 
enum  dwMapsRoadSegmentType {
  DW_MAPS_ROAD_SEGMENT_TYPE_DEFAULT = 0,
  DW_MAPS_ROAD_SEGMENT_TYPE_CONTROLLED_ACCESS = 1 << 0,
  DW_MAPS_ROAD_SEGMENT_TYPE_BRIDGE = 1 << 1,
  DW_MAPS_ROAD_SEGMENT_TYPE_TUNNEL = 1 << 2,
  DW_MAPS_ROAD_SEGMENT_TYPE_RAMP = 1 << 3,
  DW_MAPS_ROAD_SEGMENT_TYPE_URBAN = 1 << 4,
  DW_MAPS_ROAD_SEGMENT_TYPE_TOLLWAY = 1 << 5,
  DW_MAPS_ROAD_SEGMENT_TYPE_INTERSECTION = 1 << 6,
  DW_MAPS_ROAD_SEGMENT_TYPE_HIGHWAY = 1 << 7
}
 Road segment types. More...
 
enum  dwMapsSerializationFormat {
  DW_MAPS_SERIALIZATION_FORMAT_BINARY = 0,
  DW_MAPS_SERIALIZATION_FORMAT_XML = 1
}
 Serialization formats. More...
 
enum  dwMapsSide {
  DW_MAPS_SIDE_RIGHT = 0,
  DW_MAPS_SIDE_LEFT = 1,
  DW_MAPS_SIDE_NONE = 2
}
 Enum for sides. More...
 

Functions

DW_API_PUBLIC dwStatus dwMaps_computeBearing (float64_t *bearingRadian, const dwMapsGeoPoint *position, const dwMapsGeoPoint *headingPoint)
 Compute bearing in radian from two points. More...
 
DW_API_PUBLIC dwStatus dwMaps_computeBounds (dwMapsBounds *bounds, const dwMapsGeoPoint *p, float32_t radiusMeter)
 Compute WGS84 query bounds from position and radius in meters. More...
 
DW_API_PUBLIC dwStatus dwMaps_computeDistance (float32_t *distance, const dwMapsGeoPoint *p1, const dwMapsGeoPoint *p2)
 Compute Euclidean distance bewteen two points. More...
 
DW_API_PUBLIC dwStatus dwMaps_computeLocalToENU (dwMatrix3d *localToENURotation33, float32_t bearingRadian)
 Create a rotation matrix that transfroms from a local coordinate system with x-axis pointing towards bearing into the ENU coordinate system. More...
 
DW_API_PUBLIC dwStatus dwMaps_computePolylineLength (float32_t *length, const dwMapsGeoPoint *points, uint32_t pointCount)
 Compute length of a polyline of wgs84 points in meters. More...
 
DW_API_PUBLIC dwStatus dwMaps_deserialize (const char *filename, dwMapHandle_t mapHandle)
 Loads map data from file into the map. More...
 
DW_API_PUBLIC dwStatus dwMaps_getClosestLane (const dwMapsLane **closestLane, dwMapsGeoPoint *closestPoint, const dwMapsGeoPoint *p, dwBool onlyDrivable, dwBool ignoreHeight, dwConstMapHandle_t mapHandle)
 Get closest lane in the map. More...
 
DW_API_PUBLIC dwStatus dwMaps_getFeatures (dwMapsFeatureBuffer *features, uint32_t typeFilter, const dwMapsBounds *bounds, dwConstMapHandle_t mapHandle)
 Get features within bounds. More...
 
DW_API_PUBLIC dwStatus dwMaps_getLaneDividers (dwMapsLaneDividerBuffer *laneDividers, uint32_t typeFilter, const dwMapsBounds *bounds, dwConstMapHandle_t mapHandle)
 Get lane dividers within bounds. More...
 
DW_API_PUBLIC dwStatus dwMaps_getNeighborLane (const dwMapsLane **otherLane, const dwMapsLane *currentLane, dwMapsSide side, uint32_t offset, dwBool sideRelativeToDrivingDirection)
 Get a neighbor lane on a given side. More...
 
DW_API_PUBLIC dwStatus dwMaps_getNeighborLaneCount (uint32_t *laneCount, uint32_t *laneCountAccessible, const dwMapsLane *lane, dwMapsSide side, dwBool sideRelativeToDrivingDirection)
 Get the number of lanes on the current road segment next to a given lane. More...
 
DW_API_PUBLIC dwStatus dwMaps_getRoadSegments (dwMapsRoadSegmentBuffer *roadSegments, const dwMapsBounds *bounds, dwConstMapHandle_t mapHandle)
 Get road segments within bounds. More...
 
DW_API_PUBLIC dwStatus dwMaps_initialize (dwMapHandle_t *mapHandle, const char *filename, dwContextHandle_t contextHandle)
 Creates a map handle and initializes the map data by deserializing a driveworks maps file. More...
 
DW_API_PUBLIC dwStatus dwMaps_initializeHERE (dwMapHandle_t *mapHandle, const dwMapsHEREConnectionParameters *params, const char *HEREMapCacheFile, float32_t splinePointSpacing, uint32_t maxRoadSegmentCount, dwContextHandle_t contextHandle)
 Creates a map handle for HERE maps data. More...
 
DW_API_PUBLIC dwStatus dwMaps_initializeTomTom (dwMapHandle_t *mapHandle, const char *file, uint32_t maxRoadSegmentCount, dwContextHandle_t contextHandle)
 Creates a map handle for TomTom maps data. More...
 
DW_API_PUBLIC dwStatus dwMaps_interpolatePolylines (uint32_t *srcStartIndex, uint32_t *targetEndIndex, dwMapsGeoPointBuffer *interpolatedPoints, const dwMapsGeoPoint *srcPoints, uint32_t srcPointCount, const dwMapsGeoPoint *targetPoints, uint32_t targetPointCount, float32_t start, float32_t end, float32_t stepSize, float32_t(*interpolationFn)(float32_t, void *), void *interpolationFnContext)
 Interpolate between 2 polylines. More...
 
DW_API_PUBLIC dwStatus dwMaps_release (dwMapHandle_t *mapHandle)
 Release map handle. More...
 
DW_API_PUBLIC dwStatus dwMaps_serialize (const char *filename, dwMapsSerializationFormat format, dwConstMapHandle_t mapHandle)
 Stores current map content into a file. More...
 
DW_API_PUBLIC dwStatus dwMaps_stitchLaneGeometry (dwMapsGeoPointBuffer *polyline, const dwMapsLane *lanes, uint32_t laneCount, dwMapsLaneGeometry geometrySelection)
 Stitches the poylines of a list of lanes into a single polyline. More...
 
DW_API_PUBLIC dwStatus dwMaps_transformLaneDividersToLocalLines (dwMapsLaneDividerLineBuffer *lineSegments, const dwMapsLaneDividerBuffer *laneDividers, const dwMapsGeoPoint *localOrigin, const float64_t *localToENURotation33, const dwMapsLocalBounds *bounds, const dwVector3f *directionFilterVector, float32_t directionFilterAngleRadian, dwBool ignoreLaneDirection)
 Get line segments from the list of specified dividers, transformed into a local cartesian coordinate system defined by position 'localOrigin', rotation matrix 'localToENURotation33', optionally filtered by orientation and bounds in local coordinate. More...
 
DW_API_PUBLIC dwStatus dwMaps_transformPoint (dwVector3f *transformedPoint, const dwMapsGeoPoint *point, const dwMapsGeoPoint *localOrigin, const float64_t *localToENURotation33)
 Transform a WGS84 point into a point in a local coordinate system defined by position 'localOrigin' and ration matrix 'localToENURotation33'. More...
 
DW_API_PUBLIC dwStatus dwMaps_transformPolylines (dwMapsPointBuffer *transformedPoints, const dwMapsGeoPolyline *polylines, uint32_t polylineCount, const dwMapsGeoPoint *localOrigin, const float64_t *localToENURotation33)
 Transform polylines into points in a local coordinate system defined by position 'localOrigin' and rotation matrix 'localToENURotation33'. More...
 
DW_API_PUBLIC dwStatus dwMaps_transformRoadFeaturesToLocalSpace (dwMapsPolyline3fBuffer *localPolylines, dwMapsPointBuffer *pointBuffer, const dwMapsFeatureBuffer *features, const dwMapsGeoPoint *localOrigin, const float64_t *localToENURotation33, const dwMapsLocalBounds *localBounds)
 Get geometry from the list of specified road features, transformed into a local cartesian coordinate system defined by position 'localOrigin' and rotation matrix 'localToENURotation33', optionally filtered by bounds in local coordinate system. More...
 
DW_API_PUBLIC dwStatus dwMaps_update (dwBool *updated, const dwMapsBounds *bounds, dwBool download, dwMapHandle_t mapHandle)
 Updates map cache with map data within given bounds. More...
 
DW_API_PUBLIC dwStatus dwMapsLaneTree_create (const dwMapsLane *lane, float32_t limit, dwMapsLaneTreeLimit limitType, dwBool doLaneChanges, dwMapsLaneTreeHandle_t laneTree)
 Create a lane tree starting at a given lane. More...
 
DW_API_PUBLIC dwStatus dwMapsLaneTree_get (dwMapsLaneTreeNode **root, dwMapsLaneTreeNodeBuffer *laneTreeNodes, dwConstMapsLaneTreeHandle_t laneTree)
 Get the created lane tree. More...
 
DW_API_PUBLIC dwStatus dwMapsLaneTree_getLaneCount (uint32_t *laneCount, dwConstMapsLaneTreeHandle_t laneTree)
 Get total number of lanes in the lane tree. More...
 
DW_API_PUBLIC dwStatus dwMapsLaneTree_getLaneListToLeaf (dwMapsLaneBuffer *laneBuffer, uint32_t leafIndex, dwConstMapsLaneTreeHandle_t laneTree)
 Get the list of lanes that connect the root lane to a leaf. More...
 
DW_API_PUBLIC dwStatus dwMapsLaneTree_getLanes (dwMapsLaneBuffer *laneBuffer, dwConstMapsLaneTreeHandle_t laneTree)
 Get all lanes in lane tree. More...
 
DW_API_PUBLIC dwStatus dwMapsLaneTree_getLeafCount (uint32_t *leafCount, dwConstMapsLaneTreeHandle_t laneTree)
 dwMapsLaneTree_getLeafCount More...
 
DW_API_PUBLIC dwStatus dwMapsLaneTree_initialize (dwMapsLaneTreeHandle_t *laneTreeHandle, uint32_t maxLaneCount, dwConstMapHandle_t map)
 Creates a lane tree object that allows to create a tree of connected lanes. More...
 
DW_API_PUBLIC dwStatus dwMapsLaneTree_release (dwMapsLaneTreeHandle_t *laneTreeHandle)
 Release lane tree handle. More...
 
DW_API_PUBLIC dwStatus dwMapTracker_getCurrentCandidateLanes (dwMapsLaneBuffer *lanes, dwConstMapTrackerHandle_t mapTrackerHandle)
 Get current lane candidates that have been used to find the current lane. More...
 
DW_API_PUBLIC dwStatus dwMapTracker_getCurrentLane (const dwMapsLane **currentLane, dwConstMapTrackerHandle_t mapTrackerHandle)
 Get current lane that has been evaluated in the last update. More...
 
DW_API_PUBLIC dwStatus dwMapTracker_initialize (dwMapTrackerHandle_t *mapTrackerHandle, dwConstMapHandle_t map)
 Creates a map tracker handle that allows to track a pose on a map. More...
 
DW_API_PUBLIC dwStatus dwMapTracker_release (dwMapTrackerHandle_t *mapTrackerHandle)
 Release map tracker handle. More...
 
DW_API_PUBLIC dwStatus dwMapTracker_updateCurrentPose (const dwMapsGeoPoint *position, const float64_t *localToENURotation33, dwTime_t timestamp, dwBool ignoreHeight, dwBool reset, dwMapTrackerHandle_t mapTrackerHandle)
 Update the tracker with the current pose. More...