libcuspatial  24.04.00
Loading...
Searching...
No Matches
nearest_points.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022, 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 <optional>
23
24namespace cuspatial {
25
37 std::optional<std::unique_ptr<cudf::column>> nearest_point_geometry_id;
41 std::optional<std::unique_ptr<cudf::column>> nearest_linestring_geometry_id;
45 std::unique_ptr<cudf::column> nearest_segment_id;
48 std::unique_ptr<cudf::column> nearest_point_on_linestring_xy;
49};
50
163 std::optional<cudf::device_span<cudf::size_type const>> multipoint_geometry_offsets,
164 cudf::column_view points_xy,
165 std::optional<cudf::device_span<cudf::size_type const>> multilinestring_geometry_offsets,
166 cudf::device_span<cudf::size_type const> linestring_part_offsets,
167 cudf::column_view linestring_points_xy,
168 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
169
174} // 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