与轨迹相关的 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。
| 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>| 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 | 用于输出设备内存分配的可选资源 |
| 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 和时间戳列进行分组以确定唯一轨迹,然后计算包含每条轨迹中所有路线的最小边界框。
| 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 大小不同 |
num_trajectories,包含四列: x_min - 每个边界框的最小 x 坐标(千米) y_min - 每个边界框的最小 y 坐标(千米) x_max - 每个边界框的最大 x 坐标(千米) y_max - 每个边界框的最大 y 坐标(千米)| 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 列进行分组以确定唯一轨迹,然后计算每条轨迹中所有路线的平均距离和速度。
| 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 大小不同 |
num_trajectories,按 object_id 排序。| 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 ) |
计算轨迹中对象的总距离(米)和平均速度(米/秒)。
| 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 流。 |