Loading...
Searching...
No Matches
trajectory.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020-2024, 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#include <rmm/resource_ref.hpp>
26
27#include <memory>
28
29namespace cuspatial {
30
61std::pair<std::unique_ptr<cudf::table>, std::unique_ptr<cudf::column>> derive_trajectories(
62 cudf::column_view const& object_id,
63 cudf::column_view const& x,
64 cudf::column_view const& y,
65 cudf::column_view const& timestamp,
66 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
67
93std::unique_ptr<cudf::table> trajectory_distances_and_speeds(
94 cudf::size_type num_trajectories,
95 cudf::column_view const& object_id,
96 cudf::column_view const& x,
97 cudf::column_view const& y,
98 cudf::column_view const& timestamp,
99 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
100
126std::unique_ptr<cudf::table> trajectory_bounding_boxes(
127 cudf::size_type num_trajectories,
128 cudf::column_view const& object_id,
129 cudf::column_view const& x,
130 cudf::column_view const& y,
131 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
132
137} // namespace cuspatial
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::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Compute the spatial bounding boxes of trajectories. Groups the x, y, and timestamp columns by object ...
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::device_async_resource_ref 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.