Create local map layouts.
Local map layouts facilitate computation of relative poses of road segments using relative segment-to-segment transformations associated with road segment connections.
Data Structures | |
struct | dwMapsLocalLayoutSegmentPose |
Provides information about road segment pose relative to layout component root. More... | |
Functions | |
DW_API_PUBLIC dwStatus | dwMaps_transformFeaturesToLocalLinesViaRelative (dwMapsPolyline3fBuffer *featureLineSegments, dwMapsPointBuffer *featurePoints, const dwMapsFeatureBuffer *dwFeatures, const dwMatrix3f rotationLayoutRootToLocal, const dwVector3f translationLayoutRootToLocal, const dwMapsLocalBounds *localBounds, dwConstMapsLocalLayoutHandle_t localLayoutHandle, uint32_t componentId) |
Get featureLineSegments and featurePoints from the list of specified dwFeatures, transformed into the camera coordinate system. More... | |
DW_API_PUBLIC dwStatus | dwMaps_transformLaneDividersToLocalLines (dwMapsLaneDividerLineBuffer *lineSegments, const dwMapsLaneDividerBuffer *laneDividers, const dwMapsGeoPoint *localOrigin, const dwMatrix3d *localToENURotation33, const dwMapsLocalBounds *localBounds, const dwVector3f *directionFilterVector, float32_t directionFilterAngleRadian, bool ignoreLaneDirection, dwConstMapsLocalLayoutHandle_t localLayoutHandle, uint32_t componentId) |
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_transformLaneDividersToLocalLinesViaRelative (dwMapsLaneDividerLineBuffer *lineSegments, const dwMapsLaneDividerBuffer *laneDividers, const dwMatrix3f rotationLayoutRootToLocal, const dwVector3f translationLayoutRootToLocal, const dwMapsLocalBounds *localBounds, const dwVector3f *directionFilterVector, float32_t directionFilterAngleRadian, bool ignoreLaneDirection, dwConstMapsLocalLayoutHandle_t localLayoutHandle, uint32_t componentId) |
Get line segments from the list of specified dividers, transformed into the camera coordinate system. More... | |
DW_API_PUBLIC dwStatus | dwMaps_transformRoadFeaturesToLocalLines (dwMapsPolyline3fBuffer *localPolylines, dwMapsPointBuffer *localPoints, const dwMapsFeatureBuffer *features, const dwMapsGeoPoint *localOrigin, const dwMatrix3d *localToENURotation33, const dwMapsLocalBounds *localBounds, dwConstMapsLocalLayoutHandle_t localLayoutHandle, uint32_t componentId) |
Get polylines and points from the list of specified features, transformed into a local cartesian coordinate system defined by position 'localOrigin', rotation matrix 'localToENURotation33', optionally filtered by bounds in local coordinate. More... | |
DW_API_PUBLIC dwStatus | dwMapsLocalLayout_addRoadSegmentPointers (const dwMapsRoadSegment **segmentPointers, uint32_t count, dwMapsLocalLayoutHandle_t localLayoutHandle) |
Add road segment pointers to the layout. More... | |
DW_API_PUBLIC dwStatus | dwMapsLocalLayout_addRoadSegments (const dwMapsRoadSegment *segments, uint32_t count, dwMapsLocalLayoutHandle_t localLayoutHandle) |
Add road segments to the layout. More... | |
DW_API_PUBLIC dwStatus | dwMapsLocalLayout_build (const dwMapsGeoPoint *layoutOrigin, dwMapsLocalLayoutHandle_t localLayoutHandle) |
Computes relative transforms between segments previously added to the layout: More... | |
DW_API_PUBLIC dwStatus | dwMapsLocalLayout_getComponentCount (uint32_t *componentCount, dwConstMapsLocalLayoutHandle_t localLayoutHandle) |
Returns the number of connected components discovered while building the layout. More... | |
DW_API_PUBLIC dwStatus | dwMapsLocalLayout_getComponentRoot (const dwMapsRoadSegment **segment, uint32_t componentId, dwConstMapsLocalLayoutHandle_t localLayoutHandle) |
Returns the root segment of the specified connected component. More... | |
DW_API_PUBLIC dwStatus | dwMapsLocalLayout_getSegmentPose (dwMapsLocalLayoutSegmentPose *pose, const dwMapsRoadSegmentId *segmentId, dwConstMapsLocalLayoutHandle_t localLayoutHandle) |
Provides information about road segment pose relative to layout component root. More... | |
DW_API_PUBLIC dwStatus | dwMapsLocalLayout_initialize (dwMapsLocalLayoutHandle_t *localLayoutHandle, uint32_t maxRoadSegments, uint32_t maxComponents) |
Creates a local map layout object, which provides locally-accurate relative poses of road segments. More... | |
DW_API_PUBLIC dwStatus | dwMapsLocalLayout_release (dwMapsLocalLayoutHandle_t localLayoutHandle) |
Destroys a local layout object. More... | |
DW_API_PUBLIC dwStatus | dwMapsLocalLayout_reset (dwMapsLocalLayoutHandle_t localLayoutHandle) |
Clear out previously added road segments. More... | |
struct dwMapsLocalLayoutSegmentPose |
Data Fields | ||
---|---|---|
uint32_t | componentId | |
const dwMapsRoadSegment * | componentRoot | |
uint32_t | hopsFromRoot | |
dwTransformation3f | segmentToRoot |
DW_API_PUBLIC dwStatus dwMaps_transformFeaturesToLocalLinesViaRelative | ( | dwMapsPolyline3fBuffer * | featureLineSegments, |
dwMapsPointBuffer * | featurePoints, | ||
const dwMapsFeatureBuffer * | dwFeatures, | ||
const dwMatrix3f | rotationLayoutRootToLocal, | ||
const dwVector3f | translationLayoutRootToLocal, | ||
const dwMapsLocalBounds * | localBounds, | ||
dwConstMapsLocalLayoutHandle_t | localLayoutHandle, | ||
uint32_t | componentId | ||
) |
Get featureLineSegments and featurePoints from the list of specified dwFeatures, transformed into the camera coordinate system.
[in,out] | featureLineSegments | User provided feature line buffer. |
[in,out] | featurePoints | User provided feature point buffer. |
[in] | dwFeatures | The list of features to process. |
[in] | rotationLayoutRootToLocal | Rotation from the root to the local coordinate system. |
[in] | translationLayoutRootToLocal | Translation from the root to the local coordinate system. |
[in] | localBounds | Optional bounds in the local coordinate system. No filtering is applied when it is nullptr. |
[in] | localLayoutHandle | The local layout object that provides relative transforms between the road segments. |
[in] | componentId | A lane divider is included only if its parent road segment belongs to the specified local layout component. |
DW_API_PUBLIC dwStatus dwMaps_transformLaneDividersToLocalLines | ( | dwMapsLaneDividerLineBuffer * | lineSegments, |
const dwMapsLaneDividerBuffer * | laneDividers, | ||
const dwMapsGeoPoint * | localOrigin, | ||
const dwMatrix3d * | localToENURotation33, | ||
const dwMapsLocalBounds * | localBounds, | ||
const dwVector3f * | directionFilterVector, | ||
float32_t | directionFilterAngleRadian, | ||
bool | ignoreLaneDirection, | ||
dwConstMapsLocalLayoutHandle_t | localLayoutHandle, | ||
uint32_t | componentId | ||
) |
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.
[in,out] | lineSegments | User provided line segment buffer. |
[in] | laneDividers | The list of lane dividers to process. |
[in] | localOrigin | WGS84 coordinate point, origin of the local coordinate system. |
[in] | localToENURotation33 | 3x3 Rotation matrix that transforms from local coordinate system (x: forward, y: left, z: up) into ENU local cartesian coordinate system with origin at point 'localOrigin' (x: east, y: north, z: up). z coordinate of ENU is the normal of the earth spheroid at point 'localOrigin'. No rotation is applied if localToENURotation33 is nullptr, meaning x-axis points east. |
[in] | localBounds | Optional bounds in the local coordinate system. No filtering is applied when it is nullptr. |
[in] | directionFilterVector | Optional vector in local space coordinates that defines a direction to compare the line segments against. |
[in] | directionFilterAngleRadian | A line segment is included if the angle between directionFilterVector and the line segment is smaller than given angle. |
[in] | ignoreLaneDirection | If true, the angle check is applied on both sides of the line segment. Otherwise, the angle check on the line segment happens in driving direction of the corresponding lane only. Also, only lane dividers that correspond to drivable lanes are returned if ignoreLaneDirection is false. |
[in] | localLayoutHandle | The local layout object that provides relative transforms between the road segments. |
[in] | componentId | A lane divider is included only if its parent road segment belongs to the specified local layout component. |
DW_API_PUBLIC dwStatus dwMaps_transformLaneDividersToLocalLinesViaRelative | ( | dwMapsLaneDividerLineBuffer * | lineSegments, |
const dwMapsLaneDividerBuffer * | laneDividers, | ||
const dwMatrix3f | rotationLayoutRootToLocal, | ||
const dwVector3f | translationLayoutRootToLocal, | ||
const dwMapsLocalBounds * | localBounds, | ||
const dwVector3f * | directionFilterVector, | ||
float32_t | directionFilterAngleRadian, | ||
bool | ignoreLaneDirection, | ||
dwConstMapsLocalLayoutHandle_t | localLayoutHandle, | ||
uint32_t | componentId | ||
) |
Get line segments from the list of specified dividers, transformed into the camera coordinate system.
[in,out] | lineSegments | User provided line segment buffer. |
[in] | laneDividers | The list of lane dividers to process. |
[in] | rotationLayoutRootToLocal | Rotation from the root to the local coordinate system |
[in] | translationLayoutRootToLocal | Translation from the root to the local coordinate system |
[in] | localBounds | Optional bounds in the local coordinate system. No filtering is applied when it is nullptr. |
[in] | directionFilterVector | Optional vector in local space coordinates that defines a direction to compare the line segments against. |
[in] | directionFilterAngleRadian | A line segment is included if the angle between directionFilterVector and the line segment is smaller than given angle. |
[in] | ignoreLaneDirection | If true, the angle check is applied on both sides of the line segment. Otherwise, the angle check on the line segment happens in driving direction of the corresponding lane only. Also, only lane dividers that correspond to drivable lanes are returned if ignoreLaneDirection is false. |
[in] | localLayoutHandle | The local layout object that provides relative transforms between the road segments. |
[in] | componentId | A lane divider is included only if its parent road segment belongs to the specified local layout component. |
DW_API_PUBLIC dwStatus dwMaps_transformRoadFeaturesToLocalLines | ( | dwMapsPolyline3fBuffer * | localPolylines, |
dwMapsPointBuffer * | localPoints, | ||
const dwMapsFeatureBuffer * | features, | ||
const dwMapsGeoPoint * | localOrigin, | ||
const dwMatrix3d * | localToENURotation33, | ||
const dwMapsLocalBounds * | localBounds, | ||
dwConstMapsLocalLayoutHandle_t | localLayoutHandle, | ||
uint32_t | componentId | ||
) |
Get polylines and points from the list of specified features, transformed into a local cartesian coordinate system defined by position 'localOrigin', rotation matrix 'localToENURotation33', optionally filtered by bounds in local coordinate.
[in,out] | localPolylines | User provided polyline buffer. |
[in,out] | localPoints | User provided points buffer. |
[in] | features | The list of features to process. |
[in] | localOrigin | WGS84 coordinate point, origin of the local coordinate system. |
[in] | localToENURotation33 | 3x3 Rotation matrix that transforms from local coordinate system (x: forward, y: left, z: up) into ENU local cartesian coordinate system with origin at point 'localOrigin' (x: east, y: north, z: up). z coordinate of ENU is the normal of the earth spheroid at point 'localOrigin'. No rotation is applied if localToENURotation33 is nullptr, meaning x-axis points east. |
[in] | localBounds | Optional bounds in the local coordinate system. No filtering is applied when it is nullptr. |
[in] | localLayoutHandle | The local layout object that provides relative transforms between the road segments. |
[in] | componentId | A feature is included only if its parent road segment belongs to the specified local layout component. |
DW_API_PUBLIC dwStatus dwMapsLocalLayout_addRoadSegmentPointers | ( | const dwMapsRoadSegment ** | segmentPointers, |
uint32_t | count, | ||
dwMapsLocalLayoutHandle_t | localLayoutHandle | ||
) |
Add road segment pointers to the layout.
Must call dwMapsLocalLayout_build() before pose information may be retrieved. f
[in] | segmentPointers | Buffer containing road segment pointers. |
[in] | count | Number of road segment pointers. |
[in] | localLayoutHandle | Local layout handle to destroy. |
DW_API_PUBLIC dwStatus dwMapsLocalLayout_addRoadSegments | ( | const dwMapsRoadSegment * | segments, |
uint32_t | count, | ||
dwMapsLocalLayoutHandle_t | localLayoutHandle | ||
) |
Add road segments to the layout.
Must call dwMapsLocalLayout_build() before pose information may be retrieved. f
[in] | segments | Buffer containing road segments. |
[in] | count | Number of road segments. |
[in] | localLayoutHandle | Local layout handle to destroy. |
DW_API_PUBLIC dwStatus dwMapsLocalLayout_build | ( | const dwMapsGeoPoint * | layoutOrigin, |
dwMapsLocalLayoutHandle_t | localLayoutHandle | ||
) |
Computes relative transforms between segments previously added to the layout:
layoutOrigin
(according to WGS-84 coordinates of road segment's origin). This segment will be the root of a connected component in the layout.[in] | layoutOrigin | Geographic position around which layout will be performed. |
[in] | localLayoutHandle | Local layout handle. |
DW_API_PUBLIC dwStatus dwMapsLocalLayout_getComponentCount | ( | uint32_t * | componentCount, |
dwConstMapsLocalLayoutHandle_t | localLayoutHandle | ||
) |
Returns the number of connected components discovered while building the layout.
[out] | componentCount | The number of connected components discovered while building local layout. |
[in] | localLayoutHandle | Local layout handle. |
DW_API_PUBLIC dwStatus dwMapsLocalLayout_getComponentRoot | ( | const dwMapsRoadSegment ** | segment, |
uint32_t | componentId, | ||
dwConstMapsLocalLayoutHandle_t | localLayoutHandle | ||
) |
Returns the root segment of the specified connected component.
[out] | segment | Root segment of the component. |
[in] | componentId | Id of the connected component (0 < componentId < numComponents). |
[in] | localLayoutHandle | Local layout handle. |
DW_API_PUBLIC dwStatus dwMapsLocalLayout_getSegmentPose | ( | dwMapsLocalLayoutSegmentPose * | pose, |
const dwMapsRoadSegmentId * | segmentId, | ||
dwConstMapsLocalLayoutHandle_t | localLayoutHandle | ||
) |
Provides information about road segment pose relative to layout component root.
[out] | pose | Relative pose information for the specified road segment. |
[in] | segmentId | Road segment id. |
[in] | localLayoutHandle | Local layout handle. |
DW_API_PUBLIC dwStatus dwMapsLocalLayout_initialize | ( | dwMapsLocalLayoutHandle_t * | localLayoutHandle, |
uint32_t | maxRoadSegments, | ||
uint32_t | maxComponents | ||
) |
Creates a local map layout object, which provides locally-accurate relative poses of road segments.
[out] | localLayoutHandle | Handle of the created local layout. |
[in] | maxRoadSegments | The maximum number of road segments this layout may contain. |
[in] | maxComponents | The maximum number of connected components this layout may contain. |
DW_API_PUBLIC dwStatus dwMapsLocalLayout_release | ( | dwMapsLocalLayoutHandle_t | localLayoutHandle | ) |
Destroys a local layout object.
[in] | localLayoutHandle | Local layout handle to destroy. |
DW_API_PUBLIC dwStatus dwMapsLocalLayout_reset | ( | dwMapsLocalLayoutHandle_t | localLayoutHandle | ) |
Clear out previously added road segments.
[in] | localLayoutHandle | Local layout handle to destroy. |