Loading...
Searching...
No Matches
spatial_join.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020-2024, NVIDIA CORPORATION.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <cudf/types.hpp>
20
21#include <rmm/mr/device/per_device_resource.hpp>
22#include <rmm/resource_ref.hpp>
23
24#include <memory>
25
26namespace cuspatial {
27
66std::unique_ptr<cudf::table> join_quadtree_and_bounding_boxes(
67 cudf::table_view const& quadtree,
68 cudf::table_view const& bbox,
69 double x_min,
70 double x_max,
71 double y_min,
72 double y_max,
73 double scale,
74 int8_t max_depth,
75 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
76
116std::unique_ptr<cudf::table> quadtree_point_in_polygon(
117 cudf::table_view const& poly_quad_pairs,
118 cudf::table_view const& quadtree,
119 cudf::column_view const& point_indices,
120 cudf::column_view const& point_x,
121 cudf::column_view const& point_y,
122 cudf::column_view const& poly_offsets,
123 cudf::column_view const& ring_offsets,
124 cudf::column_view const& poly_points_x,
125 cudf::column_view const& poly_points_y,
126 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
127
166std::unique_ptr<cudf::table> quadtree_point_to_nearest_linestring(
167 cudf::table_view const& linestring_quad_pairs,
168 cudf::table_view const& quadtree,
169 cudf::column_view const& point_indices,
170 cudf::column_view const& point_x,
171 cudf::column_view const& point_y,
172 cudf::column_view const& linestring_offsets,
173 cudf::column_view const& linestring_points_x,
174 cudf::column_view const& linestring_points_y,
175 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
176
181} // namespace cuspatial
std::tuple< rmm::device_uvector< IndexType >, rmm::device_uvector< IndexType >, rmm::device_uvector< T > > quadtree_point_to_nearest_linestring(LinestringIndexIterator linestring_indices_first, LinestringIndexIterator linestring_indices_last, QuadIndexIterator quad_indices_first, point_quadtree_ref quadtree, PointIndexIterator point_indices_first, PointIndexIterator point_indices_last, PointIterator points_first, MultiLinestringRange linestrings, rmm::cuda_stream_view stream=rmm::cuda_stream_default, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Finds the nearest linestring to each point in a quadrant, and computes the distances between each poi...
std::pair< rmm::device_uvector< uint32_t >, rmm::device_uvector< uint32_t > > join_quadtree_and_bounding_boxes(point_quadtree_ref quadtree, BoundingBoxIterator bounding_boxes_first, BoundingBoxIterator bounding_boxes_last, vec_2d< T > const &v_min, T scale, int8_t max_depth, rmm::cuda_stream_view stream=rmm::cuda_stream_default, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Search a quadtree for polygon or linestring bounding box intersections.
std::pair< rmm::device_uvector< IndexType >, rmm::device_uvector< IndexType > > quadtree_point_in_polygon(PolyIndexIterator poly_indices_first, PolyIndexIterator poly_indices_last, QuadIndexIterator quad_indices_first, point_quadtree_ref quadtree, PointIndexIterator point_indices_first, PointIndexIterator point_indices_last, PointIterator points_first, MultiPolygonRange polygons, rmm::cuda_stream_view stream=rmm::cuda_stream_default, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Test whether the specified points are inside any of the specified polygons.