Non-owning range-based interface to multilinestring data. More...
Public Types | |
using | geometry_it_t = GeometryIterator |
using | part_it_t = PartIterator |
using | point_it_t = VecIterator |
using | point_t = iterator_value_type<VecIterator> |
using | element_t = iterator_vec_base_type<VecIterator> |
Public Member Functions | |
CUSPATIAL_HOST_DEVICE | multilinestring_range (GeometryIterator geometry_begin, GeometryIterator geometry_end, PartIterator part_begin, PartIterator part_end, VecIterator points_begin, VecIterator points_end) |
CUSPATIAL_HOST_DEVICE auto | size () |
Return the number of multilinestrings in the array. | |
CUSPATIAL_HOST_DEVICE auto | num_multilinestrings () |
Return the number of multilinestrings in the array. | |
CUSPATIAL_HOST_DEVICE auto | num_linestrings () |
Return the total number of linestrings in the array. | |
CUSPATIAL_HOST_DEVICE auto | num_points () |
Return the total number of points in the array. | |
CUSPATIAL_HOST_DEVICE auto | multilinestring_begin () |
Return the iterator to the first multilinestring in the range. | |
CUSPATIAL_HOST_DEVICE auto | multilinestring_end () |
Return the iterator to the one past the last multilinestring in the range. | |
CUSPATIAL_HOST_DEVICE auto | begin () |
Return the iterator to the first multilinestring in the range. | |
CUSPATIAL_HOST_DEVICE auto | end () |
Return the iterator to the one past the last multilinestring in the range. | |
CUSPATIAL_HOST_DEVICE auto | point_begin () |
Return the iterator to the first point in the range. | |
CUSPATIAL_HOST_DEVICE auto | point_end () |
Return the iterator to the one past the last point in the range. | |
CUSPATIAL_HOST_DEVICE auto | geometry_offset_begin () |
Return the iterator to the first geometry offset in the range. | |
CUSPATIAL_HOST_DEVICE auto | geometry_offset_end () |
Return the iterator to the one past the last geometry offset in the range. | |
CUSPATIAL_HOST_DEVICE auto | part_offset_begin () |
Return the iterator to the first part offset in the range. | |
CUSPATIAL_HOST_DEVICE auto | part_offset_end () |
Return the iterator to the one past the last part offset in the range. | |
template<typename IndexType > | |
CUSPATIAL_HOST_DEVICE auto | part_idx_from_point_idx (IndexType point_idx) |
Given the index of a point, return the part (linestring) index where the point locates. | |
template<typename IndexType > | |
CUSPATIAL_HOST_DEVICE thrust::optional< typename thrust::iterator_traits< PartIterator >::difference_type > | part_idx_from_segment_idx (IndexType point_idx) |
template<typename IndexType > | |
CUSPATIAL_HOST_DEVICE auto | geometry_idx_from_part_idx (IndexType part_idx) |
template<typename IndexType > | |
CUSPATIAL_HOST_DEVICE auto | geometry_idx_from_point_idx (IndexType point_idx) |
template<typename IndexType > | |
CUSPATIAL_HOST_DEVICE auto | intra_part_idx (IndexType global_part_idx) |
template<typename IndexType > | |
CUSPATIAL_HOST_DEVICE auto | intra_point_idx (IndexType global_point_idx) |
template<typename IndexType1 , typename IndexType2 > | |
CUSPATIAL_HOST_DEVICE bool | is_valid_segment_id (IndexType1 segment_idx, IndexType2 part_idx) |
template<typename IndexType > | |
CUSPATIAL_HOST_DEVICE auto | segment (IndexType segment_idx) |
Returns the segment given a segment index. | |
CUSPATIAL_HOST_DEVICE auto | multilinestring_point_count_begin () |
Returns an iterator to the counts of points per multilinestring. | |
CUSPATIAL_HOST_DEVICE auto | multilinestring_point_count_end () |
Returns an iterator to the counts of segments per multilinestring. | |
CUSPATIAL_HOST_DEVICE auto | multilinestring_linestring_count_begin () |
Returns an iterator to the counts of points per multilinestring. | |
CUSPATIAL_HOST_DEVICE auto | multilinestring_linestring_count_end () |
Returns an iterator to the counts of points per multilinestring. | |
auto | _segments (rmm::cuda_stream_view) |
template<typename IndexType > | |
CUSPATIAL_HOST_DEVICE auto | operator[] (IndexType multilinestring_idx) |
Returns the multilinestring_idx th multilinestring in the range. | |
CUSPATIAL_HOST_DEVICE auto | as_multipoint_range () |
Range Casts. | |
Protected Attributes | |
GeometryIterator | _geometry_begin |
GeometryIterator | _geometry_end |
PartIterator | _part_begin |
PartIterator | _part_end |
VecIterator | _point_begin |
VecIterator | _point_end |
Non-owning range-based interface to multilinestring data.
Provides a range-based interface to contiguous storage of multilinestring data, to make it easier to access and iterate over multilinestrings, linestrings and points.
Conforms to GeoArrow's specification of multilinestring: https://github.com/geopandas/geo-arrow-spec/blob/main/format.md
GeometryIterator | iterator type for the geometry offset array. Must meet the requirements of LegacyRandomAccessIterator. |
PartIterator | iterator type for the part offset array. Must meet the requirements of LegacyRandomAccessIterator. |
VecIterator | iterator type for the point array. Must meet the requirements of LegacyRandomAccessIterator. |
Definition at line 59 of file multilinestring_range.cuh.
using cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::element_t = iterator_vec_base_type<VecIterator> |
Definition at line 65 of file multilinestring_range.cuh.
using cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::geometry_it_t = GeometryIterator |
Definition at line 61 of file multilinestring_range.cuh.
using cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::part_it_t = PartIterator |
Definition at line 62 of file multilinestring_range.cuh.
using cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::point_it_t = VecIterator |
Definition at line 63 of file multilinestring_range.cuh.
using cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::point_t = iterator_value_type<VecIterator> |
Definition at line 64 of file multilinestring_range.cuh.
CUSPATIAL_HOST_DEVICE auto cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::as_multipoint_range | ( | ) |
Range Casts.
Casts the multilinestring range into a multipoint range. This treats each multilinestring as simply a collection of points, ignoring all edges in the multilinestring.
|
inline |
Return the iterator to the first multilinestring in the range.
Definition at line 93 of file multilinestring_range.cuh.
|
inline |
Return the iterator to the one past the last multilinestring in the range.
Definition at line 96 of file multilinestring_range.cuh.
CUSPATIAL_HOST_DEVICE auto cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::geometry_idx_from_part_idx | ( | IndexType | part_idx | ) |
Given the index of a part (linestring), return the geometry (multilinestring) index where the linestring locates.
CUSPATIAL_HOST_DEVICE auto cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::geometry_idx_from_point_idx | ( | IndexType | point_idx | ) |
Given the index of a point, return the geometry (multilinestring) index where the point locates.
|
inline |
Return the iterator to the first geometry offset in the range.
Definition at line 105 of file multilinestring_range.cuh.
|
inline |
Return the iterator to the one past the last geometry offset in the range.
Definition at line 108 of file multilinestring_range.cuh.
CUSPATIAL_HOST_DEVICE bool cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::is_valid_segment_id | ( | IndexType1 | segment_idx, |
IndexType2 | part_idx ) |
Given an index of a segment, returns true if the index is valid. The index of a segment is the same as the index to the starting point of the segment. Thus, the index to the last point of a linestring is an invalid segment index.
CUSPATIAL_HOST_DEVICE thrust::optional< typename thrust::iterator_traits< PartIterator >::difference_type > cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::part_idx_from_segment_idx | ( | IndexType | point_idx | ) |
Given the index of a segment, return the part (linestring) index where the segment locates. If the segment id is invalid, returns nullopt.
|
inline |
Return the iterator to the first part offset in the range.
Definition at line 111 of file multilinestring_range.cuh.
|
inline |
Return the iterator to the one past the last part offset in the range.
Definition at line 114 of file multilinestring_range.cuh.
|
inline |
Return the iterator to the first point in the range.
Definition at line 99 of file multilinestring_range.cuh.
|
inline |
Return the iterator to the one past the last point in the range.
Definition at line 102 of file multilinestring_range.cuh.
|
inline |
Return the number of multilinestrings in the array.
Definition at line 75 of file multilinestring_range.cuh.
|
protected |
Definition at line 184 of file multilinestring_range.cuh.
|
protected |
Definition at line 185 of file multilinestring_range.cuh.
|
protected |
Definition at line 186 of file multilinestring_range.cuh.
|
protected |
Definition at line 187 of file multilinestring_range.cuh.
|
protected |
Definition at line 188 of file multilinestring_range.cuh.
|
protected |
Definition at line 189 of file multilinestring_range.cuh.