与空间索引相关的API。 更多...
文件 | |
文件 | point_quadtree.hpp |
类 | |
结构体 | cuspatial::point_quadtree |
结构体 | cuspatial::point_quadtree_ref |
函数 | |
template<class PointIterator, class T = typename cuspatial::iterator_value_type<PointIterator>> | |
std::pair< rmm::device_uvector< uint32_t >, point_quadtree > | cuspatial::quadtree_on_points (PointIterator points_first, PointIterator points_last, vec_2d< T > vertex_1, vec_2d< T > vertex_2, T scale, int8_t max_depth, int32_t max_size, rmm::cuda_stream_view stream=rmm::cuda_stream_default, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource()) |
从点构建四叉树结构。 | |
std::pair< std::unique_ptr< cudf::column >, std::unique_ptr< cudf::table > > | cuspatial::quadtree_on_points (cudf::column_view const &x, cudf::column_view const &y, double x_min, double x_max, double y_min, double y_max, double scale, int8_t max_depth, cudf::size_type max_size, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource()) |
从点构建四叉树结构。 | |
与空间索引相关的API。
std::pair< std::unique_ptr< cudf::column >, std::unique_ptr< cudf::table > > cuspatial::quadtree_on_points | ( | cudf::column_view const & | x, |
cudf::column_view const & | y, | ||
double | x_min, | ||
double | x_max, | ||
double | y_min, | ||
double | y_max, | ||
double | scale, | ||
int8_t | max_depth, | ||
cudf::size_type | max_size, | ||
rmm::device_async_resource_ref | mr = rmm::mr::get_current_device_resource() ) |
从点构建四叉树结构。
scale
应用于 (x - x_min) 和 (y - y_min),将坐标转换为二维空间中的 Morton 码。max_depth
应小于 16,因为 Morton 码表示为 uint32_t
。如果点数较少或 max_size
较大,最终的层数可能会小于 max_depth
。max_size
的点数。叶节点允许(但不保证)具有 >= max_size
的点数。x | 每个点的 x 坐标列。 |
y | 每个点的 y 坐标列。 |
x_min | 感兴趣区域边界框的左下角 x 坐标。 |
x_max | 感兴趣区域边界框的右上角 x 坐标。 |
y_min | 感兴趣区域边界框的左下角 y 坐标。 |
y_max | 感兴趣区域边界框的右上角 y 坐标。 |
scale | 应用于与 x_min 和 y_min 的每个 x 和 y 距离的缩放因子。 |
max_depth | 四叉树最大深度。 |
max_size | 在节点分裂成 4 个叶节点之前允许的最大点数。 |
mr | 用于输出设备内存分配的可选资源。 |
cuspatial::logic_error | 如果 x 和 y 列大小不同 |
std::pair< rmm::device_uvector< uint32_t >, point_quadtree > cuspatial::quadtree_on_points | ( | PointIterator | points_first, |
PointIterator | points_last, | ||
vec_2d< T > | vertex_1, | ||
vec_2d< T > | vertex_2, | ||
T | scale, | ||
int8_t | max_depth, | ||
int32_t | max_size, | ||
rmm::cuda_stream_view | stream = rmm::cuda_stream_default, | ||
rmm::device_async_resource_ref | mr = rmm::mr::get_current_device_resource() ) |
从点构建四叉树结构。
scale
,将二维坐标转换为一维 Morton 码:((x - min_x) / scale
和 (y - min_y) / scale
)。max_depth
应小于 16,因为 Morton 码表示为 uint32_t
。如果点数较少或 max_size
较大,最终的层数可能会小于 max_depth
。max_size
的点数。叶节点允许(但不保证)具有 >= max_size
的点数。PointIterator | x/y 点的迭代器。必须满足 LegacyRandomAccessIterator 的要求且可设备访问。 |
T | 输入 x/y 点的浮点坐标值类型。 |
points_first | (x, y) 点范围的起始迭代器。 |
points_last | (x, y) 点范围的结束迭代器。 |
vertex_1 | 感兴趣区域边界框的顶点 |
vertex_2 | 感兴趣区域边界框中与 vertex_1 相对的顶点 |
scale | 应用于与 min.x 和 min.y 的每个 x 和 y 距离的缩放因子。 |
max_depth | 四叉树最大深度。 |
max_size | 在节点分裂成 4 个叶节点之前允许的最大点数。 |
stream | 执行计算的 CUDA 流 |
mr | 用于输出设备内存分配的可选资源。 |
vec_2d
值类型,并具有相同的基础浮点坐标类型(例如 cuspatial::vec_2d<float>
)。