Loading...
Searching...
No Matches
point_in_polygon.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/column/column.hpp>
20#include <cudf/column/column_view.hpp>
21#include <cudf/types.hpp>
22
23#include <rmm/mr/device/per_device_resource.hpp>
24#include <rmm/resource_ref.hpp>
25
26#include <memory>
27
28namespace cuspatial {
29
75std::unique_ptr<cudf::column> point_in_polygon(
76 cudf::column_view const& test_points_x,
77 cudf::column_view const& test_points_y,
78 cudf::column_view const& poly_offsets,
79 cudf::column_view const& poly_ring_offsets,
80 cudf::column_view const& poly_points_x,
81 cudf::column_view const& poly_points_y,
82 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
83
124std::unique_ptr<cudf::column> pairwise_point_in_polygon(
125 cudf::column_view const& test_points_x,
126 cudf::column_view const& test_points_y,
127 cudf::column_view const& poly_offsets,
128 cudf::column_view const& poly_ring_offsets,
129 cudf::column_view const& poly_points_x,
130 cudf::column_view const& poly_points_y,
131 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
132
137} // namespace cuspatial
OutputIt pairwise_point_in_polygon(PointRange points, PolygonRange polygons, OutputIt results, rmm::cuda_stream_view stream=rmm::cuda_stream_default)
Given (point, polygon) pairs, tests whether the point in the pair is in the polygon in the pair.
OutputIt point_in_polygon(PointRange points, PolygonRange polygons, OutputIt output, rmm::cuda_stream_view stream=rmm::cuda_stream_default)
Tests whether the specified points are inside any of the specified polygons.