DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Content Slice

Detailed Description

Retrieval interface for "sliced" data access from Content Layer(s).

Note
SW Release Applicability: These APIs are available in NVIDIA DRIVE Software releases.

The DRIVE Maps API is designed to handle optional and data-intensive content with a flexible loading strategy, where the tradeoff between map extents and content density can be flexibily managed for different real-world use cases.

1) For example, building a large scale lane graph for planning purposes may require a request of the "core map" with scope of several kilometers of the planned route. In such cases a route-based map request without layers via the Map Provider API should be adequate.

2) In a contrasting example, the localization system will require a richer view of the map including images, point clouds and/or voxels, but scoped to the local environment for example in a 200x200 meter box around the vehicle.

Content Slice is intended to address use case 2) by loading Content Layers into memory on-demand, using the Local Layout as a key to access content and to provide structure to the local graph of road segment coordinate systems.

Content Layers are partitioned (sliced) according to a provided Local Layout and content is loaded efficiently with caching of segments where possible.

Layer Views are obtained from the Content Slice providing access to loaded content in a caller-defined local coordinate system.

In cases where backing data for a Content Layer has not been requested or cached from previous requests, content getters on the Layer View object will fail with DW_NOT_AVAILABLE.

NOTE: The local availabilty of data for a Content Layer can be guaranteed by making a map request including all required layers via the Map Provider API.

Typedefs

typedef struct dwMapsContentSliceObject const * dwConstMapsContentSliceHandle_t
 
typedef struct dwMapsImageLayerViewObject const * dwConstMapsImageLayerViewHandle_t
 
typedef struct dwMapsPointCloudLayerViewObject const * dwConstMapsPointCloudLayerViewHandle_t
 
typedef struct dwMapsContentSliceObject * dwMapsContentSliceHandle_t
 
typedef uint64_t dwMapsContentUpdateToken
 Token for completion of a content slice update. More...
 
typedef struct dwMapsJunctionLayerViewObject * dwMapsJunctionLayerViewHandle_t
 

Functions

DW_API_PUBLIC dwStatus dwMapsContentSlice_initialize (dwMapsContentSliceHandle_t *contentSliceHandle, const dwMapsContentLayerBuffer *layers, size_t maxSegmentsPerLayout, dwMapProviderHandle_t providerHandle)
 Creates a new content slice, which efficiently loads and serves layered content transformed into a caller-defined local coordinate system. More...
 
DW_API_PUBLIC dwStatus dwMapsContentSlice_initializeImageLayerView (dwConstMapsImageLayerViewHandle_t *imageLayerViewHandle, dwConstMapsContentLayerHandle_t imageLayerHandle, dwMapsContentSliceHandle_t contentSliceHandle)
 Get local view of an image layer in the content slice. More...
 
DW_API_PUBLIC dwStatus dwMapsContentSlice_initializeJunctionLayerView (dwMapsJunctionLayerViewHandle_t *junctionLayerViewHandle, size_t junctionViewBytes, dwConstMapsContentLayerHandle_t junctionLayerHandle, dwMapsContentSliceHandle_t contentSliceHandle)
 Create a local view of a junction layer in the content slice. More...
 
DW_API_PUBLIC dwStatus dwMapsContentSlice_initializePointCloudLayerView (dwConstMapsPointCloudLayerViewHandle_t *pointCloudLayerViewHandle, dwConstMapsContentLayerHandle_t pointCloudLayer, dwMapsContentSliceHandle_t contentSliceHandle)
 Get local view of a point cloud layer in the content slice. More...
 
DW_API_PUBLIC dwStatus dwMapsContentSlice_release (dwMapsContentSliceHandle_t contentSliceHandle)
 Release content slice handle. More...
 
DW_API_PUBLIC dwStatus dwMapsContentSlice_tryCompleteUpdate (dwMapsContentUpdateToken updateToken, dwMapsContentSliceHandle_t contentSliceHandle)
 Attempts to complete an asynchronous sliced content update with the provided token. More...
 
DW_API_PUBLIC dwStatus dwMapsContentSlice_updateAsync (dwMapsContentUpdateToken *updateToken, dwConstMapsLocalLayoutHandle_t localLayoutHandle, uint32_t componentId, dwMapsContentSliceHandle_t contentSliceHandle)
 Updates sliced content layers with the specified local layout and component ID. More...
 

Typedef Documentation

◆ dwConstMapsContentSliceHandle_t

typedef struct dwMapsContentSliceObject const* dwConstMapsContentSliceHandle_t

Definition at line 161 of file ContentLayers.h.

◆ dwConstMapsImageLayerViewHandle_t

typedef struct dwMapsImageLayerViewObject const* dwConstMapsImageLayerViewHandle_t

Definition at line 188 of file ContentLayers.h.

◆ dwConstMapsPointCloudLayerViewHandle_t

typedef struct dwMapsPointCloudLayerViewObject const* dwConstMapsPointCloudLayerViewHandle_t

Definition at line 189 of file ContentLayers.h.

◆ dwMapsContentSliceHandle_t

typedef struct dwMapsContentSliceObject* dwMapsContentSliceHandle_t

Definition at line 160 of file ContentLayers.h.

◆ dwMapsContentUpdateToken

typedef uint64_t dwMapsContentUpdateToken

Token for completion of a content slice update.

Definition at line 186 of file ContentLayers.h.

◆ dwMapsJunctionLayerViewHandle_t

typedef struct dwMapsJunctionLayerViewObject* dwMapsJunctionLayerViewHandle_t

Definition at line 190 of file ContentLayers.h.

Function Documentation

◆ dwMapsContentSlice_initialize()

DW_API_PUBLIC dwStatus dwMapsContentSlice_initialize ( dwMapsContentSliceHandle_t contentSliceHandle,
const dwMapsContentLayerBuffer layers,
size_t  maxSegmentsPerLayout,
dwMapProviderHandle_t  providerHandle 
)

Creates a new content slice, which efficiently loads and serves layered content transformed into a caller-defined local coordinate system.

Parameters
[out]contentSliceHandleContent slice handle to be initialized
[in]layersDescriptors for desired content layers. Obtained by dwMapProvider_getContentLayers().
[in]maxSegmentsPerLayoutMaximum road segments per local layout
[in]providerHandleHandle to provider of content layers
Returns
DW_SUCCESS contentSliceHandle is successfully initialized.
DW_INVALID_ARGUMENT contentSliceHandle or layers are nullptr.
DW_BAD_ALLOC Allocation failure based on provided arguments.

◆ dwMapsContentSlice_initializeImageLayerView()

DW_API_PUBLIC dwStatus dwMapsContentSlice_initializeImageLayerView ( dwConstMapsImageLayerViewHandle_t imageLayerViewHandle,
dwConstMapsContentLayerHandle_t  imageLayerHandle,
dwMapsContentSliceHandle_t  contentSliceHandle 
)

Get local view of an image layer in the content slice.

Parameters
[out]imageLayerViewHandleHandle to the image layer view.
[in]imageLayerHandleHandle to the image layer.
[in]contentSliceHandleHandle to the content slice.
Returns
DW_SUCCESS Successfully obtained imageLayerViewHandle.
DW_INVALID_ARGUMENT contentSliceHandle is nullptr.
DW_BAD_CAST Could not successfully cast handle to content slice object.

◆ dwMapsContentSlice_initializeJunctionLayerView()

DW_API_PUBLIC dwStatus dwMapsContentSlice_initializeJunctionLayerView ( dwMapsJunctionLayerViewHandle_t junctionLayerViewHandle,
size_t  junctionViewBytes,
dwConstMapsContentLayerHandle_t  junctionLayerHandle,
dwMapsContentSliceHandle_t  contentSliceHandle 
)

Create a local view of a junction layer in the content slice.

This function creates a view to the junction layer on a content slice. The first call to the method will create a view and allocate junctionViewBytes bytes for use. Repeat calls to this method on the same content slice will return the same view object.

Parameters
[out]junctionLayerViewHandleThe junction layer view
[in]junctionViewBytesThe number of bytes to allocate for use of this view
[in]junctionLayerHandleThe junction layer handle
[in]contentSliceHandleThe content slice handle
Returns
DW_SUCCESS Successfully obtained junctionLayerViewHandle
DW_INVALID_ARGUMENT contentSliceHandle is nullptr.
DW_BAD_CAST Could not successfully cast handle to content slice object.

◆ dwMapsContentSlice_initializePointCloudLayerView()

DW_API_PUBLIC dwStatus dwMapsContentSlice_initializePointCloudLayerView ( dwConstMapsPointCloudLayerViewHandle_t pointCloudLayerViewHandle,
dwConstMapsContentLayerHandle_t  pointCloudLayer,
dwMapsContentSliceHandle_t  contentSliceHandle 
)

Get local view of a point cloud layer in the content slice.

Parameters
[out]pointCloudLayerViewHandleHandle to the point cloud layer view.
[in]pointCloudLayerHandle to the point cloud layer.
[in]contentSliceHandleHandle to the content slice.
Returns
DW_SUCCESS Successfully obtained pointCloudLayerViewHandle
DW_INVALID_ARGUMENT contentSliceHandle is nullptr.
DW_BAD_CAST Could not successfully cast handle to content slice object.

◆ dwMapsContentSlice_release()

DW_API_PUBLIC dwStatus dwMapsContentSlice_release ( dwMapsContentSliceHandle_t  contentSliceHandle)

Release content slice handle.

Parameters
[in]contentSliceHandleContent slice handle to be released
Returns
DW_SUCCESS Successfully released image layout object and handle.
DW_INVALID_ARGUMENT contentSliceHandle is nullptr.
DW_BAD_CAST Could not successfully cast handle to image layout object.

◆ dwMapsContentSlice_tryCompleteUpdate()

DW_API_PUBLIC dwStatus dwMapsContentSlice_tryCompleteUpdate ( dwMapsContentUpdateToken  updateToken,
dwMapsContentSliceHandle_t  contentSliceHandle 
)

Attempts to complete an asynchronous sliced content update with the provided token.

Parameters
[out]updateTokenToken used to retrieve updated content layer views.
[in]contentSliceHandleContent slice object to update.
Returns
DW_SUCCESS Successfully completed content update with the provider token.
DW_NOT_READY Update cannot be completed because content is loading.
DW_BAD_CAST Could not successfully cast handle to content slice object.

◆ dwMapsContentSlice_updateAsync()

DW_API_PUBLIC dwStatus dwMapsContentSlice_updateAsync ( dwMapsContentUpdateToken updateToken,
dwConstMapsLocalLayoutHandle_t  localLayoutHandle,
uint32_t  componentId,
dwMapsContentSliceHandle_t  contentSliceHandle 
)

Updates sliced content layers with the specified local layout and component ID.

This call will modify the state of all content layer views which may have been obtained from the content slice. If backing data for a view is not yet updated, method calls on content layer views for the slice should return DW_NOT_READY.

Parameters
[out]updateTokenToken used to complete content update.
[in]localLayoutHandleLocal layout handle to use for content update.
[in]componentIdId of the connected component (0 < componentId < numComponents).
[in]contentSliceHandleContent slice object to update.
Returns
DW_SUCCESS Successfully updated content with the given local layout.
DW_INVALID_ARGUMENT Null or otherwise invalid argument was provided.
DW_FAILURE Content layers could not be updated for the slice.
DW_BAD_CAST Could not successfully cast handle to content slice object.