libcuspatial
23.12.00
|
#include <rmm/cuda_stream_view.hpp>
#include <cuspatial/detail/point_linestring_nearest_points.cuh>
Go to the source code of this file.
Functions | |
template<class Vec2dItA , class Vec2dItB , class OffsetIteratorA , class OffsetIteratorB , class OffsetIteratorC , class OutputIt > | |
OutputIt | cuspatial::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. | |
OutputIt cuspatial::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.
The nearest point from a test point to a linestring is a point on the linestring that has the shortest distance to the test point compared to any other points on the linestring.
The nearest point from a test multipoint to a multilinestring is the nearest point that has the shortest distance in all pairs of points and linestrings.
In addition, this API writes these geometry and part ID where the nearest point locates to output iterators:
Cart2dItA | iterator type for point array of the point element of each pair. Must meet the requirements of LegacyRandomAccessIterator and be device-accessible. |
Cart2dItB | iterator type for point array of the linestring element of each pair. Must meet the requirements of LegacyRandomAccessIterator and be device-accessible. |
OffsetIteratorA | iterator type for point_geometry_offset array. Must meet the requirements of LegacyRandomAccessIterator and be device-accessible. |
OffsetIteratorB | iterator type for linestring_geometry_offset array. Must meet the requirements of LegacyRandomAccessIterator and be device-accessible. |
OffsetIteratorC | iterator type for linestring_part_offset array. Must meet the requirements of LegacyRandomAccessIterator and be device-accessible. |
OutputIt | iterator type for output array. Must meet the requirements of LegacyRandomAccessIterator and be device-accessible. |
point_geometry_offset_first | beginning of the range of multipoint geometries of each pair |
point_geometry_offset_last | end of the range of multipoint geometries of each pair |
points_first | beginning of the range of point values |
points_last | end of the range of the point values |
linestring_geometry_offset_first | beginning of the range of offsets to the multilinestring geometry of each pair, the end range is implied by linestring_geometry_offset_first + std::distance(point_geometry_offset_first , point_geometry_offset_last ) |
linestring_offsets_first | beginning of the range of offsets to the starting point of each linestring |
linestring_offsets_last | end of the range of offsets to the starting point of each linestring |
linestring_points_first | beginning of the range of linestring points |
linestring_points_last | end of the range of linestring points |
output_first | A zipped-iterator of 4 outputs. The first element should be compatible with iterator_value_type<OffsetIteratorA>, stores the geometry ID of the nearest point in multipoint. The second element should be compatible with iterator_value_type<OffsetIteratorB>, stores the geometry ID of the nearest linestring. The third element should be compatible with iterator_value_type<OffsetIteratorC>, stores the part ID to the nearest segment. The forth element should be compatible with vec_2d, stores the coordinate of the nearest point on the (multi)linestring. |
stream | The CUDA stream to use for device memory operations and kernel launches. |
cuspatial::vec_2d
type, and must have the same base floating point type.