dongjoon-hyun commented on code in PR #2269:
URL: https://github.com/apache/orc/pull/2269#discussion_r2152511674


##########
c++/include/orc/Geospatial.hh:
##########
@@ -0,0 +1,256 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+#include <array>
+#include <cmath>
+#include <cstdint>
+#include <ostream>
+#include <string>
+#include <string_view>
+#include <unordered_set>
+#include <vector>
+
+namespace orc::geospatial {
+
+  /// \brief Infinity, used to define bounds of empty bounding boxes
+  constexpr double kInf = std::numeric_limits<double>::infinity();
+
+  /// \brief The maximum number of dimensions represented by a geospatial type
+  /// (i.e., X, Y, Z, and M)
+  inline constexpr int kMaxDimensions = 4;
+
+  /// \brief Valid combinations of dimensions allowed by ISO well-known binary
+  ///
+  /// These values correspond to the 0, 1000, 2000, 3000 component of the WKB 
integer
+  /// geometry type (i.e., the value of geometry_type // 1000).
+  enum class Dimensions { kXY = 0, kXYZ = 1, kXYM = 2, kXYZM = 3, kValueMin = 
0, kValueMax = 3 };
+
+  /// \brief The supported set of geometry types allowed by ISO well-known 
binary
+  ///
+  /// These values correspond to the 1, 2, ..., 7 component of the WKB integer
+  /// geometry type (i.e., the value of geometry_type % 1000).
+  enum class GeometryType {
+    kPoint = 1,
+    kLinestring = 2,
+    kPolygon = 3,
+    kMultiPoint = 4,
+    kMultiLinestring = 5,
+    kMultiPolygon = 6,
+    kGeometryCollection = 7,
+    kValueMin = 1,
+    kValueMax = 7

Review Comment:
   Do we need to define `kValueMin` and `kValueMax` here?



##########
c++/include/orc/Geospatial.hh:
##########
@@ -0,0 +1,256 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+#include <array>
+#include <cmath>
+#include <cstdint>
+#include <ostream>
+#include <string>
+#include <string_view>
+#include <unordered_set>
+#include <vector>
+
+namespace orc::geospatial {
+
+  /// \brief Infinity, used to define bounds of empty bounding boxes
+  constexpr double kInf = std::numeric_limits<double>::infinity();
+
+  /// \brief The maximum number of dimensions represented by a geospatial type
+  /// (i.e., X, Y, Z, and M)
+  inline constexpr int kMaxDimensions = 4;
+
+  /// \brief Valid combinations of dimensions allowed by ISO well-known binary
+  ///
+  /// These values correspond to the 0, 1000, 2000, 3000 component of the WKB 
integer
+  /// geometry type (i.e., the value of geometry_type // 1000).
+  enum class Dimensions { kXY = 0, kXYZ = 1, kXYM = 2, kXYZM = 3, kValueMin = 
0, kValueMax = 3 };
+
+  /// \brief The supported set of geometry types allowed by ISO well-known 
binary
+  ///
+  /// These values correspond to the 1, 2, ..., 7 component of the WKB integer
+  /// geometry type (i.e., the value of geometry_type % 1000).
+  enum class GeometryType {
+    kPoint = 1,
+    kLinestring = 2,
+    kPolygon = 3,
+    kMultiPoint = 4,
+    kMultiLinestring = 5,
+    kMultiPolygon = 6,
+    kGeometryCollection = 7,
+    kValueMin = 1,
+    kValueMax = 7

Review Comment:
   Do we need to define `kValueMin` and `kValueMax` here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@orc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to