Functions to query map data.
|
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...
|
|
◆ dwMaps_getClosestLane()
Get closest lane in the map.
- Parameters
-
[out] | closestLane | Optional. Closest lane that has been found. |
[out] | closestPoint | Optional. Closest point on the closest lane. |
[in] | p | Query point |
[in] | onlyDrivable | If true, only drivable lanes are considered. |
[in] | ignoreHeight | If true, all points are projected onto height 0 before computing the distances. |
[in] | mapHandle | Map 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()
Get features within bounds.
Feature is returned if at least one geometry point is within the provided bounds
- Parameters
-
[in,out] | features | User provided feature buffer. |
[in] | typeFilter | Combination of dwMapsFeatureType values to filter the returned features by type. |
[in] | bounds | Query bounds. Defines the region of returned features. All data is returned if bounds is a nullptr. |
[in] | mapHandle | Map 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()
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] | laneDividers | User provided lane divider buffer. |
[in] | typeFilter | Combination of dwMapsLaneDividerType values to filter the returned lane dividers by type. |
[in] | bounds | Query bounds. Defines the region of returned lane dividers. All data is returned if bounds is a nullptr. |
[in] | mapHandle | Map 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()
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] | roadSegments | User provided road segment buffer. |
[in] | bounds | Query bounds. Defines the region of returned lane divider lines. All data is returned if bounds is a nullptr. |
[in] | mapHandle | Map 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.