Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator > Class Template Reference

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_idxth 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
 

Detailed Description

template<typename GeometryIterator, typename PartIterator, typename VecIterator>
class cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >

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

Template Parameters
GeometryIteratoriterator type for the geometry offset array. Must meet the requirements of LegacyRandomAccessIterator.
PartIteratoriterator type for the part offset array. Must meet the requirements of LegacyRandomAccessIterator.
VecIteratoriterator type for the point array. Must meet the requirements of LegacyRandomAccessIterator.
Note
Though this object is host/device compatible, The underlying iterator must be device accessible if used in device kernel.

Definition at line 59 of file multilinestring_range.cuh.

Member Typedef Documentation

◆ element_t

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
using cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::element_t = iterator_vec_base_type<VecIterator>

Definition at line 65 of file multilinestring_range.cuh.

◆ geometry_it_t

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
using cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::geometry_it_t = GeometryIterator

Definition at line 61 of file multilinestring_range.cuh.

◆ part_it_t

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
using cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::part_it_t = PartIterator

Definition at line 62 of file multilinestring_range.cuh.

◆ point_it_t

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
using cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::point_it_t = VecIterator

Definition at line 63 of file multilinestring_range.cuh.

◆ point_t

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
using cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::point_t = iterator_value_type<VecIterator>

Definition at line 64 of file multilinestring_range.cuh.

Member Function Documentation

◆ as_multipoint_range()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
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.

◆ begin()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::begin ( )
inline

Return the iterator to the first multilinestring in the range.

Definition at line 93 of file multilinestring_range.cuh.

◆ end()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::end ( )
inline

Return the iterator to the one past the last multilinestring in the range.

Definition at line 96 of file multilinestring_range.cuh.

◆ geometry_idx_from_part_idx()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
template<typename IndexType >
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.

◆ geometry_idx_from_point_idx()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
template<typename IndexType >
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.

◆ geometry_offset_begin()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::geometry_offset_begin ( )
inline

Return the iterator to the first geometry offset in the range.

Definition at line 105 of file multilinestring_range.cuh.

◆ geometry_offset_end()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::geometry_offset_end ( )
inline

Return the iterator to the one past the last geometry offset in the range.

Definition at line 108 of file multilinestring_range.cuh.

◆ is_valid_segment_id()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
template<typename IndexType1 , typename IndexType2 >
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.

◆ part_idx_from_segment_idx()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
template<typename IndexType >
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.

◆ part_offset_begin()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::part_offset_begin ( )
inline

Return the iterator to the first part offset in the range.

Definition at line 111 of file multilinestring_range.cuh.

◆ part_offset_end()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::part_offset_end ( )
inline

Return the iterator to the one past the last part offset in the range.

Definition at line 114 of file multilinestring_range.cuh.

◆ point_begin()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::point_begin ( )
inline

Return the iterator to the first point in the range.

Definition at line 99 of file multilinestring_range.cuh.

◆ point_end()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::point_end ( )
inline

Return the iterator to the one past the last point in the range.

Definition at line 102 of file multilinestring_range.cuh.

◆ size()

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::size ( )
inline

Return the number of multilinestrings in the array.

Definition at line 75 of file multilinestring_range.cuh.

Member Data Documentation

◆ _geometry_begin

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
GeometryIterator cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::_geometry_begin
protected

Definition at line 184 of file multilinestring_range.cuh.

◆ _geometry_end

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
GeometryIterator cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::_geometry_end
protected

Definition at line 185 of file multilinestring_range.cuh.

◆ _part_begin

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
PartIterator cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::_part_begin
protected

Definition at line 186 of file multilinestring_range.cuh.

◆ _part_end

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
PartIterator cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::_part_end
protected

Definition at line 187 of file multilinestring_range.cuh.

◆ _point_begin

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
VecIterator cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::_point_begin
protected

Definition at line 188 of file multilinestring_range.cuh.

◆ _point_end

template<typename GeometryIterator , typename PartIterator , typename VecIterator >
VecIterator cuspatial::multilinestring_range< GeometryIterator, PartIterator, VecIterator >::_point_end
protected

Definition at line 189 of file multilinestring_range.cuh.


The documentation for this class was generated from the following file: