DriveWorks SDK Reference

| 0.6.67 Release

Map Queries

Detailed Description

Functions to query map data.

Functions

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_getRoadSegments (dwMapsRoadSegmentBuffer *roadSegments, const dwMapsBounds *bounds, dwConstMapHandle_t mapHandle)
 Get road segments within bounds. More...
 

Function Documentation

◆ dwMaps_getClosestLane()

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.

Parameters
[out]closestLaneOptional. Closest lane that has been found.
[out]closestPointOptional. Closest point on the closest lane.
[in]pQuery point
[in]onlyDrivableIf true, only drivable lanes are considered.
[in]ignoreHeightIf true, all points are projected onto height 0 before computing the distances.
[in]mapHandleMap to read from.
Returns
DW_SUCCESS Closest lane has been found
DW_NOT_AVAILABLE No lanes have been found around query point 'p'. DW_BAD_CAST Could not successfully cast handle to map object.

◆ dwMaps_getFeatures()

DW_API_PUBLIC dwStatus dwMaps_getFeatures ( dwMapsFeatureBuffer features,
uint32_t  typeFilter,
const dwMapsBounds bounds,
dwConstMapHandle_t  mapHandle 
)

Get features within bounds.

Feature is returned if at least one geometry point is within the provided bounds

Parameters
[in,out]featuresUser provided feature buffer.
[in]typeFilterCombination of dwMapsFeatureType values to filter the returned features by type.
[in]boundsQuery bounds. Defines the region of returned features. All data is returned if bounds is a nullptr.
[in]mapHandleMap to read from.
Returns
DW_SUCCESS On success.
DW_INVALID_ARGUMENT 'features' is a nullptr or maxSize of 'features'
is not big enough.
DW_INTERNAL_ERROR Unexpected internal sanity check failure.
DW_BAD_CAST Could not successfully cast handle to map object.

◆ dwMaps_getLaneDividers()

DW_API_PUBLIC dwStatus dwMaps_getLaneDividers ( dwMapsLaneDividerBuffer laneDividers,
uint32_t  typeFilter,
const dwMapsBounds bounds,
dwConstMapHandle_t  mapHandle 
)

Get lane dividers within bounds.

Some of the returned lane dividers may be outside of the bounds, but it is guaranteed that all lines within the bounds are returned.

Parameters
[in,out]laneDividersUser provided lane divider buffer.
[in]typeFilterCombination of dwMapsLaneDividerType values to filter the returned lane dividers by type.
[in]boundsQuery bounds. Defines the region of returned lane dividers. All data is returned if bounds is a nullptr.
[in]mapHandleMap to read from.
Returns
DW_SUCCESS Lane divider query successful.
DW_INVALID_ARGUMENT 'laneDividers' is a nullptr or maxSize of 'laneDividers'
is not big enough.
DW_INTERNAL_ERROR Unexpected internal sanity check failure.
DW_BAD_CAST Could not successfully cast handle to map object.

◆ dwMaps_getRoadSegments()

DW_API_PUBLIC dwStatus dwMaps_getRoadSegments ( dwMapsRoadSegmentBuffer roadSegments,
const dwMapsBounds bounds,
dwConstMapHandle_t  mapHandle 
)

Get road segments within bounds.

Some of the returned road segments may be outside of the bounds, but it is guaranteed that all road segments within the bounds are returned.

Parameters
[in,out]roadSegmentsUser provided road segment buffer.
[in]boundsQuery bounds. Defines the region of returned lane divider lines. All data is returned if bounds is a nullptr.
[in]mapHandleMap to read from.
Returns
DW_SUCCESS Road segment query successful.
DW_INVALID_ARGUMENT 'roadSegments' is a nullptr, or maxSize of 'roadSegments' buffer is not big enough.
DW_INTERNAL_ERROR Unexpected internal sanity check failure.
DW_BAD_CAST Could not successfully cast handle to map object.