paleolimbot commented on code in PR #240:
URL: https://github.com/apache/parquet-format/pull/240#discussion_r1769197825
##########
src/main/thrift/parquet.thrift:
##########
@@ -237,6 +237,135 @@ struct SizeStatistics {
3: optional list<i64> definition_level_histogram;
}
+/**
+ * Physical type and encoding for the geometry type.
+ */
+enum GeometryEncoding {
+ /**
+ * Allowed for physical type: BYTE_ARRAY.
+ *
+ * Well-known binary (WKB) representations of geometries.
+ *
+ * To be clear, we follow the same rule of WKB and coordinate axis order from
+ * GeoParquet [1][2]. Geometries SHOULD be encoded as ISO WKB [3][4]
+ * supporting XY, XYZ, XYM, XYZM and the standard geometry types
+ * Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon,
+ * and GeometryCollection). Coordinate order is always (x, y) where x is
+ * easting or longitude and y is northing or latitude. This ordering
explicitly
+ * overrides the axis order as specified in the CRS following the GeoPackage
+ * specification [5].
+ *
+ * This is the preferred encoding for maximum portability. It also supports
+ * GeometryStatistics to be set in the column chunk and page index.
+ *
+ * [1]
https://github.com/opengeospatial/geoparquet/blob/v1.1.0/format-specs/geoparquet.md?plain=1#L92
+ * [2]
https://github.com/opengeospatial/geoparquet/blob/v1.1.0/format-specs/geoparquet.md?plain=1#L155
+ * [3] https://portal.ogc.org/files/?artifact_id=18241
+ * [4] https://www.iso.org/standard/60343.html
+ * [5] https://www.geopackage.org/spec130/#gpb_spec
+ */
+ WKB = 0;
+}
+
+/**
+ * Interpretation for edges of elements of a GEOMETRY logical type. In other
+ * words, whether a point between two vertices should be interpolated in
+ * its XY dimensions as if it were a Cartesian line connecting the two
+ * vertices (planar) or the shortest spherical arc between the longitude
+ * and latitude represented by the two vertices (spherical). This value
+ * applies to all non-point geometry objects and is independent of the
+ * coordinate reference system.
+ *
+ * Because most systems currently assume planar edges and do not support
+ * spherical edges, planar should be used as the default value.
+ */
+enum EdgeInterpolation {
+ PLANAR = 0;
+ SPHERICAL = 1;
Review Comment:
There are several threads here that discuss this, but briefly, we need to
ensure that the intent of mainstream producers that (1) have a geometry type
and (2) export Parquet files can be expressed. BigQuery and Snowflake geography
types approximate connecting two vertices using an arc assuming a sphere; all
other geometry types connect vertices with a straight line regardless of the
CRS.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]