Loading...
Searching...
No Matches
trajectory.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020-2022, NVIDIA CORPORATION.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <cudf/column/column.hpp>
20#include <cudf/column/column_view.hpp>
21#include <cudf/table/table.hpp>
22#include <cudf/types.hpp>
23
24#include <rmm/mr/device/per_device_resource.hpp>
25
26#include <memory>
27
28namespace cuspatial {
29
60std::pair<std::unique_ptr<cudf::table>, std::unique_ptr<cudf::column>> derive_trajectories(
61 cudf::column_view const& object_id,
62 cudf::column_view const& x,
63 cudf::column_view const& y,
64 cudf::column_view const& timestamp,
65 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
66
92std::unique_ptr<cudf::table> trajectory_distances_and_speeds(
93 cudf::size_type num_trajectories,
94 cudf::column_view const& object_id,
95 cudf::column_view const& x,
96 cudf::column_view const& y,
97 cudf::column_view const& timestamp,
98 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
99
125std::unique_ptr<cudf::table> trajectory_bounding_boxes(
126 cudf::size_type num_trajectories,
127 cudf::column_view const& object_id,
128 cudf::column_view const& x,
129 cudf::column_view const& y,
130 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
131
136} // namespace cuspatial
std::unique_ptr< rmm::device_uvector< OffsetType > > derive_trajectories(IdInputIt ids_first, IdInputIt ids_last, PointInputIt points_first, TimestampInputIt timestamps_first, IdOutputIt ids_output_first, PointOutputIt points_output_first, TimestampOutputIt timestamps_output_first, rmm::cuda_stream_view stream=rmm::cuda_stream_default, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Derive trajectories from object ids, points, and timestamps.
OutputIt trajectory_distances_and_speeds(IndexT num_trajectories, IdInputIt ids_first, IdInputIt ids_last, PointInputIt points_first, TimestampInputIt timestamps_first, OutputIt distances_and_speeds_first, rmm::cuda_stream_view stream=rmm::cuda_stream_default)
Compute the total distance (in meters) and average speed (in m/s) of objects in trajectories.
std::unique_ptr< cudf::table > trajectory_bounding_boxes(cudf::size_type num_trajectories, cudf::column_view const &object_id, cudf::column_view const &x, cudf::column_view const &y, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Compute the spatial bounding boxes of trajectories. Groups the x, y, and timestamp columns by object ...