Factory method to create coordinate iterators. More...
Functions | |
template<typename FirstIter , typename SecondIter > | |
auto | cuspatial::make_vec_2d_iterator (FirstIter first, SecondIter second) |
Create an iterator to vec_2d data from two input iterators. | |
template<typename Iter > | |
auto | cuspatial::make_vec_2d_iterator (Iter xy_begin) |
Create an iterator to vec_2d data from a single iterator. | |
template<typename FirstIter , typename SecondIter > | |
auto | cuspatial::make_vec_2d_output_iterator (FirstIter first, SecondIter second) |
Create an output iterator to vec_2d data from two output iterators. | |
template<typename Iter > | |
auto | cuspatial::make_vec_2d_output_iterator (Iter d_points_begin) |
Create an output iterator to vec_2d data from an iterator to an interleaved array. | |
template<typename FirstIter , typename SecondIter > | |
auto | cuspatial::make_box_iterator (FirstIter first, SecondIter second) |
Create an iterator to box data from two input iterators of vec_2d . | |
template<typename MinXIter , typename MinYIter , typename MaxXIter , typename MaxYIter > | |
auto | cuspatial::make_box_output_iterator (MinXIter min_x, MinYIter min_y, MaxXIter max_x, MaxYIter max_y) |
Create an output iterator to box data from multiple output iterators. | |
template<typename IndexT , typename GeometryIter > | |
auto | cuspatial::make_geometry_id_iterator (GeometryIter offsets_begin, GeometryIter offsets_end) |
Create an input iterator that generates zero-based sequential geometry IDs for each element based on the input offset range. | |
template<typename IndexT , typename GeometryIter , typename PartIter > | |
auto | cuspatial::make_geometry_id_iterator (GeometryIter geometry_offsets_begin, GeometryIter geometry_offsets_end, PartIter part_offsets_begin) |
Create an input iterator that generates zero-based sequential geometry IDs for each element of a nested geometry based on the input geometry and part offset ranges. | |
template<typename OffsetIterator > | |
auto | cuspatial::make_count_iterator_from_offset_iterator (OffsetIterator it) |
Factory method to create coordinate iterators.
CuSpatial header-only API functions only accept input/output iterators. These factory make it easier to create iterators from data in various formats.
auto cuspatial::make_box_iterator | ( | FirstIter | first, |
SecondIter | second ) |
Create an iterator to box
data from two input iterators of vec_2d
.
Interleaves box_min and box_max points from separate iterators into a single iterator of box
.
VectorType | cuSpatial vector type, must be vec_2d |
FirstIter | Iterator of vec_2d . Must meet the requirements of LegacyRandomAccessIterator and be device-accessible. |
SecondIter | Iterator of vec_2d . Must meet the requirements of LegacyRandomAccessIterator and be device-accessible. |
first | Iterator to beginning of box::v1 |
second | Iterator to beginning of box::v2 |
box
first
and second
must iterate the same vec_2d data type. Definition at line 308 of file iterator_factory.cuh.
auto cuspatial::make_box_output_iterator | ( | MinXIter | min_x, |
MinYIter | min_y, | ||
MaxXIter | max_x, | ||
MaxYIter | max_y ) |
Create an output iterator to box
data from multiple output iterators.
Creates an output iterator from separate coordinate iterators to which can be written interleaved x/y data for box vertices (2 per box). This allows using four separate arrays of output data with APIs that expect an iterator to structured box data.
MinXIter | Iterator type to the x-coordinate of the first box vertex. Must meet the requirements of LegacyRandomAccessIterator, be mutable and be device-accessible. |
MinYIter | Iterator type to the y-coordinate of the first box vertex. Must meet the requirements of LegacyRandomAccessIterator, be mutable and be device-accessible. |
MaxXIter | Iterator type to the x-coordinate of the second box vertex. Must meet the requirements of LegacyRandomAccessIterator, be mutable and be device-accessible. |
MaxYIter | Iterator type to the y-coordinate of the second box vertex. Must meet the requirements of LegacyRandomAccessIterator, be mutable and be device-accessible. |
min_x | Iterator to beginning of x data for first box vertices. |
min_y | Iterator to beginning of y data for first box vertices. |
max_x | Iterator to beginning of x data for second box vertices. |
max_y | Iterator to beginning of y data for second box vertices. |
box
Definition at line 348 of file iterator_factory.cuh.
auto cuspatial::make_count_iterator_from_offset_iterator | ( | OffsetIterator | it | ) |
Definition at line 429 of file iterator_factory.cuh.
auto cuspatial::make_geometry_id_iterator | ( | GeometryIter | geometry_offsets_begin, |
GeometryIter | geometry_offsets_end, | ||
PartIter | part_offsets_begin ) |
Create an input iterator that generates zero-based sequential geometry IDs for each element of a nested geometry based on the input geometry and part offset ranges.
This can be used for any two-level nested multigeometry offsets, e.g. multipolygons.
Example:
GeometryIter | The offset iterator type. Must meet the requirements of LegacyRandomAccessIterator and be device-accessible. |
offsets_begin | Beginning of range of geometry offsets |
offsets_end | End of range of geometry offsets |
part_offsets_begin | Beginning of range of part (e.g. ring) offsets |
Definition at line 415 of file iterator_factory.cuh.
auto cuspatial::make_geometry_id_iterator | ( | GeometryIter | offsets_begin, |
GeometryIter | offsets_end ) |
Create an input iterator that generates zero-based sequential geometry IDs for each element based on the input offset range.
This can be used for any single-level geometry offsets, e.g. multipoints, multilinestrings, (multi)trajectories. And using custom iterators it can be used for nested types.
Example:
GeometryIter | The offset iterator type. Must meet the requirements of LegacyRandomAccessIterator and be device-accessible. |
offsets_begin | Beginning of range of geometry offsets |
offsets_end | End of range of geometry offsets |
Definition at line 380 of file iterator_factory.cuh.
auto cuspatial::make_vec_2d_iterator | ( | FirstIter | first, |
SecondIter | second ) |
Create an iterator to vec_2d
data from two input iterators.
Interleaves x and y coordinates from separate iterators into a single iterator to xy- coordinates.
VectorType | cuSpatial vector type, must be vec_2d |
FirstIter | Iterator type to the first component of vec_2d . Must meet the requirements of LegacyRandomAccessIterator and be device-accessible. |
SecondIter | Iterator type to the second component of vec_2d . Must meet the requirements of LegacyRandomAccessIterator and be device-accessible. |
first | Iterator to beginning of vec_2d::x |
second | Iterator to beginning of vec_2d::y |
vec_2d
first
and second
must iterate on same data type. Definition at line 212 of file iterator_factory.cuh.
auto cuspatial::make_vec_2d_iterator | ( | Iter | xy_begin | ) |
Create an iterator to vec_2d
data from a single iterator.
Creates a vec2d view from an iterator to the starting range of interleaved x-y coordinates.
param d_points_begin
Definition at line 231 of file iterator_factory.cuh.
auto cuspatial::make_vec_2d_output_iterator | ( | FirstIter | first, |
SecondIter | second ) |
Create an output iterator to vec_2d
data from two output iterators.
Creates an output iterator from separate iterators to x and y data to which can be written interleaved x/y data. This allows using two separate arrays of output data with APIs that expect an iterator to structured data.
VectorType | cuSpatial vector type, must be vec_2d |
FirstIter | Iterator type to the first component of vec_2d . Must meet the requirements of LegacyRandomAccessIterator, be mutable and be device-accessible. |
SecondIter | Iterator type to the second component of vec_2d . Must meet the requirements of LegacyRandomAccessIterator, be mutable and be device-accessible. |
first | Iterator to beginning of x data. |
second | Iterator to beginning of y data. |
vec_2d
first
and second
must iterate on same data type. Definition at line 258 of file iterator_factory.cuh.
auto cuspatial::make_vec_2d_output_iterator | ( | Iter | d_points_begin | ) |
Create an output iterator to vec_2d
data from an iterator to an interleaved array.
Iter | type of iterator to interleaved data. Must meet the requirements of [LegacyRandomAccessIterator][LinkLRAI], be mutable and be device-accessible. |
d_points_begin | Iterator to beginning of interleaved data. |
vec_2d
Definition at line 274 of file iterator_factory.cuh.