Loading...
Searching...
No Matches
geometry_column_view.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023, 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 <cuspatial/types.hpp>
20
21#include <cudf/lists/lists_column_view.hpp>
22#include <cudf/types.hpp>
23
24namespace cuspatial {
25
37class geometry_column_view : private cudf::lists_column_view {
38 public:
39 geometry_column_view(cudf::column_view const& column,
40 collection_type_id collection_type,
41 geometry_type_id geometry_type);
44 ~geometry_column_view() = default;
45
46 geometry_column_view& operator=(geometry_column_view const&) = default;
47
48 geometry_column_view& operator=(geometry_column_view&&) = default;
49
50 geometry_type_id geometry_type() const { return _geometry_type; }
51
52 collection_type_id collection_type() const { return _collection_type; }
53
54 cudf::data_type coordinate_type() const;
55
56 using cudf::lists_column_view::child;
57 using cudf::lists_column_view::offsets;
58 using cudf::lists_column_view::size;
59
60 protected:
61 collection_type_id _collection_type;
62 geometry_type_id _geometry_type;
63};
64
65} // namespace cuspatial
A non-owning, immutable view of a geometry column.
geometry_type_id
The underlying geometry type of a geometry_column_view.
Definition types.hpp:26
collection_type_id
The underlying collection type of a geometry_column_view.
Definition types.hpp:31