desruisseaux commented on code in PR #10981:
URL: https://github.com/apache/iceberg/pull/10981#discussion_r1806278747


##########
format/spec.md:
##########
@@ -483,6 +485,8 @@ Notes:
 2. For `float` and `double`, the value `-0.0` must precede `+0.0`, as in the 
IEEE 754 `totalOrder` predicate. NaNs are not permitted as lower or upper 
bounds.
 3. If sort order ID is missing or unknown, then the order is assumed to be 
unsorted. Only data files and equality delete files should be written with a 
non-null order id. [Position deletes](#position-delete-files) are required to 
be sorted by file and position, not a table order, and should set sort order id 
to null. Readers must ignore sort order id for position delete files.
 4. The following field ids are reserved on `data_file`: 141.
+5. For `geometry`, this is a point. X = min value of all component points of 
all geometries in file when edges = PLANAR, westernmost bound of all geometries 
in file if edges = SPHERICAL. Y = max value of all component points of all 
geometries in file when edges = PLANAR, northernmost bound of all geometries if 
edges = SPHERICAL. Z is min value for all component points of all geometries in 
the file. M is min value of all component points of all geometries in the file. 
See Appendix D for encoding.

Review Comment:
   > Nowaday the trend seems to be Geography vs Geometry type actually
   
   This trend was initiated by PostGIS, but I don't know how widely it is used 
outside PostGIS. This is not necessarily a trend that we should follow. The 
PostGIS's Geography type can handle envelopes crossing the anti-meridian 
(longitude wraparound), but this is not the only case where wraparounds are 
needed. Other examples are:
   
   * Radar data using a polar coordinate system.
   * Climatological data, where "December" is followed by "January" of no 
particular year (temporal wraparound).
   
   Instead of a distinct Geography type, a better and more generic solution is 
to interpret "min" and "max" as "starting point" and "ending point", with 
interior in the direction of increasing values. So `min > max` (or `west > 
east`) means that a wraparound happens at infinity:
   
   
![image](https://github.com/user-attachments/assets/dc26cd6a-77ce-4747-8346-aa97be48cdee)
   
   This convention is already used by the EPSG geodetic registry, by the GGXF 
standard, by some versions of the WMS or WCS standards (I do not remember which 
one exactly). This is the only truly generic approach that I'm aware of. All 
other approaches work only in special cases.



-- 
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...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to