正在加载...
正在搜索...
无匹配项
轨迹 API

与轨迹相关的 API。更多...

文件

文件  trajectory.hpp
 
文件  trajectory.cuh
 

函数

template<typename IdInputIt, typename PointInputIt, typename TimestampInputIt, typename IdOutputIt, typename PointOutputIt, typename TimestampOutputIt, typename OffsetType = std::int32_t>
std::unique_ptr< rmm::device_uvector< OffsetType > > cuspatial::derive_trajectories (IdInputIt ids_first, IdInputIt ids_last, PointInputIt points_first, TimestampInputIt timestamps_first, IdOutputIt ids_output_first, PointOutputIt points_output_first, TimestampOutputIt timestamps_output_first, rmm::cuda_stream_view stream=rmm::cuda_stream_default, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
 从对象 ID、点和时间戳导出轨迹。
 
template<typename IdInputIt, typename PointInputIt, typename TimestampInputIt, typename OutputIt, typename IndexT = iterator_value_type<IdInputIt>>
OutputIt cuspatial::trajectory_distances_and_speeds (IndexT num_trajectories, IdInputIt ids_first, IdInputIt ids_last, PointInputIt points_first, TimestampInputIt timestamps_first, OutputIt distances_and_speeds_first, rmm::cuda_stream_view stream=rmm::cuda_stream_default)
 计算轨迹中对象的总距离(米)和平均速度(米/秒)。
 
std::pair< std::unique_ptr< cudf::table >, std::unique_ptr< cudf::column > > cuspatial::derive_trajectories (cudf::column_view const &object_id, cudf::column_view const &x, cudf::column_view const &y, cudf::column_view const ×tamp, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
 从对象 ID、点和时间戳导出轨迹。
 
std::unique_ptr< cudf::table > cuspatial::trajectory_distances_and_speeds (cudf::size_type num_trajectories, cudf::column_view const &object_id, cudf::column_view const &x, cudf::column_view const &y, cudf::column_view const ×tamp, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
 计算轨迹中对象的距离和速度。按对象 ID 对时间戳、x 和 y 列进行分组以确定唯一轨迹,然后计算每条轨迹中所有路线的平均距离和速度。
 
std::unique_ptr< cudf::table > cuspatial::trajectory_bounding_boxes (cudf::size_type num_trajectories, cudf::column_view const &object_id, cudf::column_view const &x, cudf::column_view const &y, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
 计算轨迹的空间边界框。按对象 ID 对 x、y 和时间戳列进行分组以确定唯一轨迹,然后计算包含每条轨迹中所有路线的最小边界框。
 

详细描述

与轨迹相关的 API。

函数文档

◆ derive_trajectories() [1/2]

std::pair< std::unique_ptr< cudf::table >, std::unique_ptr< cudf::column > > cuspatial::derive_trajectories ( cudf::column_view const & object_id,
cudf::column_view const & x,
cudf::column_view const & y,
cudf::column_view const & timestamp,
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource() )

从对象 ID、点和时间戳导出轨迹。

对输入的物体 ID 进行分组以确定唯一的轨迹。返回一个包含轨迹 ID、每条轨迹中的物体数量以及每条轨迹的第一个物体在输入物体 ID 列中的偏移位置的表。

参数
object_id物体(例如,车辆)ID 的列
x坐标(千米)
y坐标(千米)
timestamp任意分辨率的时间戳列
mr用于输出设备内存分配的可选资源
异常
cuspatial::logic_error如果 object_id 不是 cudf::type_id::INT32 类型
cuspatial::logic_error如果 x 和 y 类型不同
cuspatial::logic_error如果 timestamp 不是 cudf::TIMESTAMP 类型
cuspatial::logic_error如果 object_id、x、y 或 timestamp 包含空值
cuspatial::logic_error如果 object_id、x、y 和 timestamp 大小不同
返回
一个 std::pair<table, column>
  1. 按 (object_id, timestamp) 排序的 (object_id, x, y, timestamp) 表
  2. 包含每条轨迹第一个物体起始位置的 int32 列

◆ derive_trajectories() [2/2]

template<typename IdInputIt, typename PointInputIt, typename TimestampInputIt, typename IdOutputIt, typename PointOutputIt, typename TimestampOutputIt, typename OffsetType = std::int32_t>
std::unique_ptr< rmm::device_uvector< OffsetType > > cuspatial::derive_trajectories ( IdInputIt ids_first,
IdInputIt ids_last,
PointInputIt points_first,
TimestampInputIt timestamps_first,
IdOutputIt ids_output_first,
PointOutputIt points_output_first,
TimestampOutputIt timestamps_output_first,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource() )

从对象 ID、点和时间戳导出轨迹。

输出点和时间戳被重新排序,按对象 ID 分组,并在组内按时间戳排序。返回一个向量,其中包含输出中每条轨迹第一个物体的偏移索引。

模板参数
IdInputIt对象 ID 迭代器。必须满足 LegacyRandomAccessIterator 的要求且可从设备读取。
PointInputIt点迭代器。必须满足 LegacyRandomAccessIterator 的要求且可从设备读取。
TimestampInputIt时间戳迭代器。必须满足 LegacyRandomAccessIterator 的要求且可从设备读取。
IdOutputIt输出对象 ID 迭代器。必须满足 LegacyRandomAccessIterator 的要求且可写入设备。
PointOutputIt输出点迭代器。必须满足 LegacyRandomAccessIterator 的要求且可写入设备。
TimestampOutputIt输出时间戳迭代器。必须满足 LegacyRandomAccessIterator 的要求且可写入设备。
参数
ids_first输入对象 ID 范围的起始
ids_last输入对象 ID 范围的结束
points_first输入点 (x,y) 坐标范围的起始
timestamps_first输入时间戳范围的起始
ids_out_first输出对象 ID 范围的起始
points_out_first输出点 (x,y) 坐标范围的起始
timestamps_out_first输出时间戳范围的起始
stream用于执行计算和分配内存的 CUDA 流。
mr用于输出设备内存分配的可选资源
返回
指向 device_uvector 的 unique_ptr,其中包含排序后的输出中每条轨迹第一个物体的偏移索引。这些偏移可用于访问排序后的输出数据。
先决条件
任何输入和输出范围之间不得重叠。
对象 ID 和时间戳的类型必须支持通过比较运算符进行严格弱排序。

◆ trajectory_bounding_boxes()

std::unique_ptr< cudf::table > cuspatial::trajectory_bounding_boxes ( cudf::size_type num_trajectories,
cudf::column_view const & object_id,
cudf::column_view const & x,
cudf::column_view const & y,
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource() )

计算轨迹的空间边界框。按对象 ID 对 x、y 和时间戳列进行分组以确定唯一轨迹,然后计算包含每条轨迹中所有路线的最小边界框。

注意
假定 object_id, timestamp, x, y 已按 (object_id, timestamp) 预排序。
参数
num_trajectories轨迹数(唯一对象 ID)
object_id物体(例如,车辆)ID 的列
x坐标(千米)
y坐标(千米)
mr用于输出设备内存分配的可选资源
异常
cuspatial::logic_error如果 object_id 不是 cudf::type_id::INT32 类型
cuspatial::logic_error如果 x 和 y 类型不同
cuspatial::logic_error如果 object_id、x 或 y 包含空值
cuspatial::logic_error如果 object_id、x 和 y 大小不同
返回
一个 cudf 边界框表,长度为 num_trajectories,包含四列: x_min - 每个边界框的最小 x 坐标(千米) y_min - 每个边界框的最小 y 坐标(千米) x_max - 每个边界框的最大 x 坐标(千米) y_max - 每个边界框的最大 y 坐标(千米)

◆ trajectory_distances_and_speeds() [1/2]

std::unique_ptr< cudf::table > cuspatial::trajectory_distances_and_speeds ( cudf::size_type num_trajectories,
cudf::column_view const & object_id,
cudf::column_view const & x,
cudf::column_view const & y,
cudf::column_view const & timestamp,
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource() )

计算轨迹中对象的距离和速度。按对象 ID 对时间戳、x 和 y 列进行分组以确定唯一轨迹,然后计算每条轨迹中所有路线的平均距离和速度。

注意
假定 object_id, timestamp, x, y 已按 (object_id, timestamp) 预排序。
参数
num_trajectories轨迹数(唯一对象 ID)
object_id物体(例如,车辆)ID 的列
x坐标(千米)
y坐标(千米)
timestamp任意分辨率的时间戳列
mr用于输出设备内存分配的可选资源
异常
cuspatial::logic_error如果 object_id 不是 cudf::type_id::INT32 类型
cuspatial::logic_error如果 x 和 y 类型不同
cuspatial::logic_error如果 timestamp 不是 cudf::TIMESTAMP 类型
cuspatial::logic_error如果 object_id、x、y 或 timestamp 包含空值
cuspatial::logic_error如果 object_id、x、y 和 timestamp 大小不同
返回
一个 cuDF 表,包含距离(米)和速度(米/秒),长度为 num_trajectories,按 object_id 排序。

◆ trajectory_distances_and_speeds() [2/2]

template<typename IdInputIt, typename PointInputIt, typename TimestampInputIt, typename OutputIt, typename IndexT = iterator_value_type<IdInputIt>>
OutputIt cuspatial::trajectory_distances_and_speeds ( IndexT num_trajectories,
IdInputIt ids_first,
IdInputIt ids_last,
PointInputIt points_first,
TimestampInputIt timestamps_first,
OutputIt distances_and_speeds_first,
rmm::cuda_stream_view stream = rmm::cuda_stream_default )

计算轨迹中对象的总距离(米)和平均速度(米/秒)。

注意
假定 object_id, timestamp, x, y 已按 (object_id, timestamp) 预排序。
模板参数
IdInputIt对象 ID 迭代器。必须满足 LegacyRandomAccessIterator 的要求且可从设备读取。
PointInputIt点迭代器。必须满足 LegacyRandomAccessIterator 的要求且可从设备读取。
TimestampInputIt时间戳迭代器。必须满足 LegacyRandomAccessIterator 的要求且可从设备读取。
OutputIt输出(距离、速度)对迭代器。必须满足 LegacyRandomAccessIterator 的要求且可写入设备。
IndexT对象 ID 的类型。
参数
num_trajectories轨迹数(唯一对象 ID)
ids_first输入对象 ID 范围的起始
ids_last输入对象 ID 范围的结束
points_first输入点 (x,y) 坐标范围的起始
timestamps_first输入时间戳范围的起始
distances_and_speeds_first输出(距离、速度)对范围的起始
stream用于执行计算和分配内存的 CUDA 流。
返回
输出(距离、速度)对范围结束的迭代器。