Loading...
Searching...
No Matches
nearest_points.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022-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_view.hpp>
20#include <cudf/utilities/span.hpp>
21
22#include <rmm/resource_ref.hpp>
23
24#include <optional>
25
26namespace cuspatial {
27
39 std::optional<std::unique_ptr<cudf::column>> nearest_point_geometry_id;
43 std::optional<std::unique_ptr<cudf::column>> nearest_linestring_geometry_id;
47 std::unique_ptr<cudf::column> nearest_segment_id;
50 std::unique_ptr<cudf::column> nearest_point_on_linestring_xy;
51};
52
165 std::optional<cudf::device_span<cudf::size_type const>> multipoint_geometry_offsets,
166 cudf::column_view points_xy,
167 std::optional<cudf::device_span<cudf::size_type const>> multilinestring_geometry_offsets,
168 cudf::device_span<cudf::size_type const> linestring_part_offsets,
169 cudf::column_view linestring_points_xy,
170 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
171
176} // namespace cuspatial
OutputIt pairwise_point_linestring_nearest_points(OffsetIteratorA points_geometry_offsets_first, OffsetIteratorA points_geometry_offsets_last, Vec2dItA points_first, Vec2dItA points_last, OffsetIteratorB linestring_geometry_offsets_first, OffsetIteratorC linestring_part_offsets_first, OffsetIteratorC linestring_part_offsets_last, Vec2dItB linestring_points_first, Vec2dItB linestring_points_last, OutputIt output_first, rmm::cuda_stream_view stream=rmm::cuda_stream_default)
Compute the nearest points and geometry ID between pairs of multipoint and multilinestring.
Container for the result of pairwise_point_linestring_nearest_points
std::unique_ptr< cudf::column > nearest_segment_id
std::unique_ptr< cudf::column > nearest_point_on_linestring_xy
std::optional< std::unique_ptr< cudf::column > > nearest_point_geometry_id
std::optional< std::unique_ptr< cudf::column > > nearest_linestring_geometry_id