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

Non-owning range-based interface to multipoint data. More...

Public Types

using geometry_it_t = GeometryIterator
 
using point_it_t = VecIterator
 
using index_t = iterator_value_type<geometry_it_t>
 
using point_t = iterator_value_type<point_it_t>
 
using element_t = iterator_vec_base_type<point_it_t>
 

Public Member Functions

CUSPATIAL_HOST_DEVICE multipoint_range (GeometryIterator geometry_begin, GeometryIterator geometry_end, VecIterator points_begin, VecIterator points_end)
 Construct a new multipoint array object.
 
CUSPATIAL_HOST_DEVICE auto num_multipoints ()
 Returns the number of multipoints in the array.
 
CUSPATIAL_HOST_DEVICE auto num_points ()
 Returns the number of points in the array.
 
CUSPATIAL_HOST_DEVICE auto size ()
 Returns the number of multipoints in the array.
 
CUSPATIAL_HOST_DEVICE auto multipoint_begin ()
 Returns the iterator to the first multipoint in the multipoint array.
 
CUSPATIAL_HOST_DEVICE auto multipoint_end ()
 Returns the iterator past the last multipoint in the multipoint array.
 
CUSPATIAL_HOST_DEVICE auto begin ()
 Returns the iterator to the start of the multipoint array.
 
CUSPATIAL_HOST_DEVICE auto end ()
 Returns the iterator past the last multipoint in the multipoint array.
 
CUSPATIAL_HOST_DEVICE auto point_begin ()
 Returns the iterator to the start of the underlying point array.
 
CUSPATIAL_HOST_DEVICE auto point_end ()
 Returns the iterator to the end of the underlying point array.
 
CUSPATIAL_HOST_DEVICE auto offsets_begin ()
 Returns the iterator to the start of the underlying offsets array.
 
CUSPATIAL_HOST_DEVICE auto offsets_end ()
 Returns the iterator to the end of the underlying offsets array.
 
template<typename IndexType >
CUSPATIAL_HOST_DEVICE auto geometry_idx_from_point_idx (IndexType point_idx) const
 Returns the geometry index of the given point index.
 
template<typename IndexType >
CUSPATIAL_HOST_DEVICE auto operator[] (IndexType idx)
 Returns the idxth multipoint in the array.
 
template<typename IndexType >
CUSPATIAL_HOST_DEVICE auto point (IndexType idx)
 Returns the idxth point in the array.
 
CUSPATIAL_HOST_DEVICE bool is_single_point_range ()
 Returns true if the range contains only single points Undefined behavior if the range is an empty range.
 

Protected Attributes

GeometryIterator _geometry_begin
 Iterator to the start of the index array of start positions to each multipoint.
 
GeometryIterator _geometry_end
 Iterator to the past-the-end of the index array of start positions to each multipoint.
 
VecIterator _points_begin
 Iterator to the start of the point array.
 
VecIterator _points_end
 Iterator to the past-the-end position of the point array.
 

Detailed Description

template<typename GeometryIterator, typename VecIterator>
class cuspatial::multipoint_range< GeometryIterator, VecIterator >

Non-owning range-based interface to multipoint data.

Provides a range-based interface to contiguous storage of multipoint data, to make it easier to access and iterate over multipoints and points.

Conforms to GeoArrow's specification of multipoint array: https://github.com/geopandas/geo-arrow-spec/blob/main/format.md

Template Parameters
GeometryIteratoriterator type for the 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 should be device-accessible if used in a device kernel.

Definition at line 53 of file multipoint_range.cuh.

Member Typedef Documentation

◆ element_t

template<typename GeometryIterator , typename VecIterator >
using cuspatial::multipoint_range< GeometryIterator, VecIterator >::element_t = iterator_vec_base_type<point_it_t>

Definition at line 59 of file multipoint_range.cuh.

◆ geometry_it_t

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

Definition at line 55 of file multipoint_range.cuh.

◆ index_t

template<typename GeometryIterator , typename VecIterator >
using cuspatial::multipoint_range< GeometryIterator, VecIterator >::index_t = iterator_value_type<geometry_it_t>

Definition at line 57 of file multipoint_range.cuh.

◆ point_it_t

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

Definition at line 56 of file multipoint_range.cuh.

◆ point_t

template<typename GeometryIterator , typename VecIterator >
using cuspatial::multipoint_range< GeometryIterator, VecIterator >::point_t = iterator_value_type<point_it_t>

Definition at line 58 of file multipoint_range.cuh.

Member Function Documentation

◆ begin()

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

Returns the iterator to the start of the multipoint array.

Definition at line 97 of file multipoint_range.cuh.

◆ end()

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

Returns the iterator past the last multipoint in the multipoint array.

Definition at line 102 of file multipoint_range.cuh.

◆ operator[]()

template<typename GeometryIterator , typename VecIterator >
template<typename IndexType >
CUSPATIAL_HOST_DEVICE auto cuspatial::multipoint_range< GeometryIterator, VecIterator >::operator[] ( IndexType idx)

Returns the idxth multipoint in the array.

Template Parameters
IndexTypetype of the index
Parameters
idxthe index to the multipoint
Returns
a multipoint object

◆ point()

template<typename GeometryIterator , typename VecIterator >
template<typename IndexType >
CUSPATIAL_HOST_DEVICE auto cuspatial::multipoint_range< GeometryIterator, VecIterator >::point ( IndexType idx)

Returns the idxth point in the array.

Template Parameters
IndexTypetype of the index
Parameters
idxthe index to the point
Returns
a vec_2d object

◆ size()

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

Returns the number of multipoints in the array.

Definition at line 82 of file multipoint_range.cuh.

Member Data Documentation

◆ _geometry_begin

template<typename GeometryIterator , typename VecIterator >
GeometryIterator cuspatial::multipoint_range< GeometryIterator, VecIterator >::_geometry_begin
protected

Iterator to the start of the index array of start positions to each multipoint.

Definition at line 158 of file multipoint_range.cuh.

◆ _geometry_end

template<typename GeometryIterator , typename VecIterator >
GeometryIterator cuspatial::multipoint_range< GeometryIterator, VecIterator >::_geometry_end
protected

Iterator to the past-the-end of the index array of start positions to each multipoint.

Definition at line 160 of file multipoint_range.cuh.

◆ _points_begin

template<typename GeometryIterator , typename VecIterator >
VecIterator cuspatial::multipoint_range< GeometryIterator, VecIterator >::_points_begin
protected

Iterator to the start of the point array.

Definition at line 162 of file multipoint_range.cuh.

◆ _points_end

template<typename GeometryIterator , typename VecIterator >
VecIterator cuspatial::multipoint_range< GeometryIterator, VecIterator >::_points_end
protected

Iterator to the past-the-end position of the point array.

Definition at line 164 of file multipoint_range.cuh.


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