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

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

Public Types

using geometry_it_t = GeometryIterator
 
using part_it_t = PartIterator
 
using ring_it_t = RingIterator
 
using point_it_t = VecIterator
 
using point_t = iterator_value_type<VecIterator>
 
using index_t = iterator_value_type<GeometryIterator>
 
using element_t = iterator_vec_base_type<VecIterator>
 

Public Member Functions

 multipolygon_range (GeometryIterator geometry_begin, GeometryIterator geometry_end, PartIterator part_begin, PartIterator part_end, RingIterator ring_begin, RingIterator ring_end, VecIterator points_begin, VecIterator points_end)
 
CUSPATIAL_HOST_DEVICE auto size ()
 Return the number of multipolygons in the array.
 
CUSPATIAL_HOST_DEVICE auto num_multipolygons ()
 Return the number of multipolygons in the array.
 
CUSPATIAL_HOST_DEVICE auto num_polygons ()
 Return the total number of polygons in the array.
 
CUSPATIAL_HOST_DEVICE auto num_rings ()
 Return the total number of rings in the array.
 
CUSPATIAL_HOST_DEVICE auto num_points ()
 Return the total number of points in the array.
 
CUSPATIAL_HOST_DEVICE auto multipolygon_begin ()
 Return the iterator to the first multipolygon in the range.
 
CUSPATIAL_HOST_DEVICE auto multipolygon_end ()
 Return the iterator to the one past the last multipolygon in the range.
 
CUSPATIAL_HOST_DEVICE auto begin ()
 Return the iterator to the first multipolygon in the range.
 
CUSPATIAL_HOST_DEVICE auto end ()
 Return the iterator to the one past the last multipolygon 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.
 
CUSPATIAL_HOST_DEVICE auto ring_offset_begin ()
 Return the iterator to the first ring offset in the range.
 
CUSPATIAL_HOST_DEVICE auto ring_offset_end ()
 Return the iterator to the one past the last ring offset in the range.
 
template<typename IndexType >
CUSPATIAL_HOST_DEVICE auto ring_idx_from_point_idx (IndexType point_idx)
 Given the index of a point, return the index of the ring that contains the point.
 
template<typename IndexType >
CUSPATIAL_HOST_DEVICE auto part_idx_from_ring_idx (IndexType ring_idx)
 Given the index of a ring, return the index of the part (polygon) that contains the point.
 
template<typename IndexType >
CUSPATIAL_HOST_DEVICE auto geometry_idx_from_part_idx (IndexType part_idx)
 
template<typename IndexType >
CUSPATIAL_HOST_DEVICE auto operator[] (IndexType multipolygon_idx)
 Returns the multipolygon_idxth multipolygon in the range.
 
CUSPATIAL_HOST_DEVICE auto multipolygon_point_count_begin ()
 
CUSPATIAL_HOST_DEVICE auto multipolygon_point_count_end ()
 
CUSPATIAL_HOST_DEVICE auto multipolygon_ring_count_begin ()
 Returns an iterator to the number of rings of the first multipolygon.
 
CUSPATIAL_HOST_DEVICE auto multipolygon_ring_count_end ()
 Returns the one past the iterator to the number of rings of the last multipolygon.
 
auto _segments (rmm::cuda_stream_view)
 
CUSPATIAL_HOST_DEVICE auto as_multipoint_range ()
 Range Casting.
 
CUSPATIAL_HOST_DEVICE auto as_multilinestring_range ()
 Cast the range of multipolygons as a range of multilinestrings, ignoring ring relationships.
 

Protected Attributes

GeometryIterator _geometry_begin
 
GeometryIterator _geometry_end
 
PartIterator _part_begin
 
PartIterator _part_end
 
RingIterator _ring_begin
 
RingIterator _ring_end
 
VecIterator _point_begin
 
VecIterator _point_end
 

Detailed Description

template<typename GeometryIterator, typename PartIterator, typename RingIterator, typename VecIterator>
class cuspatial::multipolygon_range< GeometryIterator, PartIterator, RingIterator, VecIterator >

Non-owning range-based interface to multipolygon data.

Provides a range-based interface to contiguous storage of multipolygon data, to make it easier to access and iterate over multipolygons, polygons, rings and points.

Conforms to GeoArrow's specification of multipolygon: 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.
RingIteratoriterator type for the ring 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 64 of file multipolygon_range.cuh.

Member Typedef Documentation

◆ element_t

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

Definition at line 73 of file multipolygon_range.cuh.

◆ geometry_it_t

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

Definition at line 66 of file multipolygon_range.cuh.

◆ index_t

template<typename GeometryIterator , typename PartIterator , typename RingIterator , typename VecIterator >
using cuspatial::multipolygon_range< GeometryIterator, PartIterator, RingIterator, VecIterator >::index_t = iterator_value_type<GeometryIterator>

Definition at line 72 of file multipolygon_range.cuh.

◆ part_it_t

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

Definition at line 67 of file multipolygon_range.cuh.

◆ point_it_t

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

Definition at line 69 of file multipolygon_range.cuh.

◆ point_t

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

Definition at line 70 of file multipolygon_range.cuh.

◆ ring_it_t

template<typename GeometryIterator , typename PartIterator , typename RingIterator , typename VecIterator >
using cuspatial::multipolygon_range< GeometryIterator, PartIterator, RingIterator, VecIterator >::ring_it_t = RingIterator

Definition at line 68 of file multipolygon_range.cuh.

Member Function Documentation

◆ as_multipoint_range()

template<typename GeometryIterator , typename PartIterator , typename RingIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multipolygon_range< GeometryIterator, PartIterator, RingIterator, VecIterator >::as_multipoint_range ( )

Range Casting.

Cast the range of multipolygons as a range of multipoints, ignoring all edge connections and ring relationships.

◆ begin()

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

Return the iterator to the first multipolygon in the range.

Definition at line 106 of file multipolygon_range.cuh.

◆ end()

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

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

Definition at line 109 of file multipolygon_range.cuh.

◆ geometry_idx_from_part_idx()

template<typename GeometryIterator , typename PartIterator , typename RingIterator , typename VecIterator >
template<typename IndexType >
CUSPATIAL_HOST_DEVICE auto cuspatial::multipolygon_range< GeometryIterator, PartIterator, RingIterator, VecIterator >::geometry_idx_from_part_idx ( IndexType part_idx)

Given the index of a part (polygon), return the index of the geometry (multipolygon) that contains the part.

◆ geometry_offset_begin()

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

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

Definition at line 118 of file multipolygon_range.cuh.

◆ geometry_offset_end()

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

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

Definition at line 121 of file multipolygon_range.cuh.

◆ multipolygon_point_count_begin()

template<typename GeometryIterator , typename PartIterator , typename RingIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multipolygon_range< GeometryIterator, PartIterator, RingIterator, VecIterator >::multipolygon_point_count_begin ( )

Returns an iterator to the number of points of the first multipolygon

Note
The count includes the duplicate first and last point of the ring.

◆ multipolygon_point_count_end()

template<typename GeometryIterator , typename PartIterator , typename RingIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multipolygon_range< GeometryIterator, PartIterator, RingIterator, VecIterator >::multipolygon_point_count_end ( )

Returns the one past the iterator to the number of points of the last multipolygon

Note
The count includes the duplicate first and last point of the ring.

◆ part_offset_begin()

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

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

Definition at line 124 of file multipolygon_range.cuh.

◆ part_offset_end()

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

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

Definition at line 127 of file multipolygon_range.cuh.

◆ ring_offset_begin()

template<typename GeometryIterator , typename PartIterator , typename RingIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multipolygon_range< GeometryIterator, PartIterator, RingIterator, VecIterator >::ring_offset_begin ( )
inline

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

Definition at line 130 of file multipolygon_range.cuh.

◆ ring_offset_end()

template<typename GeometryIterator , typename PartIterator , typename RingIterator , typename VecIterator >
CUSPATIAL_HOST_DEVICE auto cuspatial::multipolygon_range< GeometryIterator, PartIterator, RingIterator, VecIterator >::ring_offset_end ( )
inline

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

Definition at line 133 of file multipolygon_range.cuh.

◆ size()

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

Return the number of multipolygons in the array.

Definition at line 85 of file multipolygon_range.cuh.

Member Data Documentation

◆ _geometry_begin

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

Definition at line 179 of file multipolygon_range.cuh.

◆ _geometry_end

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

Definition at line 180 of file multipolygon_range.cuh.

◆ _part_begin

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

Definition at line 181 of file multipolygon_range.cuh.

◆ _part_end

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

Definition at line 182 of file multipolygon_range.cuh.

◆ _point_begin

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

Definition at line 185 of file multipolygon_range.cuh.

◆ _point_end

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

Definition at line 186 of file multipolygon_range.cuh.

◆ _ring_begin

template<typename GeometryIterator , typename PartIterator , typename RingIterator , typename VecIterator >
RingIterator cuspatial::multipolygon_range< GeometryIterator, PartIterator, RingIterator, VecIterator >::_ring_begin
protected

Definition at line 183 of file multipolygon_range.cuh.

◆ _ring_end

template<typename GeometryIterator , typename PartIterator , typename RingIterator , typename VecIterator >
RingIterator cuspatial::multipolygon_range< GeometryIterator, PartIterator, RingIterator, VecIterator >::_ring_end
protected

Definition at line 184 of file multipolygon_range.cuh.


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