Skip to content

Commit 2228707

Browse files
committed
Shorten the description according to the Iceberg PR
1 parent 3b9a069 commit 2228707

File tree

1 file changed

+6
-57
lines changed

1 file changed

+6
-57
lines changed

Geospatial.md

Lines changed: 6 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -93,40 +93,12 @@ Bounding box is defined as the thrift struct below in the representation of
9393
min/max value pair of coordinates from each axis. Note that X and Y Values are
9494
always present. Z and M are omitted for 2D geospatial instances.
9595

96-
Writers should follow the guidelines below when calculating bounding boxes in
97-
the presence of edge cases.
98-
99-
* `null` instance: Skip it and continue processing the remaining
100-
geospatial instances. Do not produce a bounding box if all instances are null.
101-
* Non-`null` instance with [special geospatial values](#special-geospatial-values):
102-
* X and Y: Skip any special X or Y value and continue processing the
103-
remaining X or Y values. Do not produce a bounding box if all X or all Y
104-
values are special values.
105-
106-
* Z: Skip any special Z value and continue processing the remaining Z values.
107-
Omit Z from the bounding box if all Z values are special values.
108-
109-
* M: Skip any special M value and continue processing the remaining M values.
110-
Omit M from the bounding box if all M values are special values.
111-
112-
Readers should follow the guidelines below when examining bounding boxes.
113-
114-
* No bounding box: No assumptions can be made about the presence or validity
115-
of geospatial values. Readers may need to load all individual coordinate
116-
values for validation.
117-
118-
* A bounding box is present:
119-
* X and Y: Both X and Y of the bounding box must be present. If any of
120-
`xmin`, `ymin`, `xmax`, or `ymax` is `NaN`, the bounding box is not
121-
reliable and should not be used.
122-
* Z: If Z of the bounding box is missing or either `zmin` or `zmax` is
123-
`NaN`, readers should not assume anything about the presence or
124-
validity of Z values and may need to load individual coordinates for
125-
validation.
126-
* M: If M of the bounding box is missing or either `mmin` or `mmax` is
127-
`NaN`, readers should not assume anything about the presence or
128-
validity of M values and may need to load individual coordinates for
129-
validation.
96+
When calculating a bounding box, null or NaN values in a coordinate
97+
dimension are skipped. For example, `POINT (1 NaN)` contributes a value to X
98+
but no values to Y, Z, or M dimension of the bounding box. If a dimension has
99+
only null or NaN values, that dimension is omitted from the bounding box. If
100+
either the X or Y dimension is missing, then the bounding box itself is not
101+
produced.
130102

131103
For the X values only, xmin may be greater than xmax. In this case, an object
132104
in this bounding box may match if it contains an X such that `x >= xmin` OR
@@ -196,26 +168,3 @@ The axis order of the coordinates in WKB and bounding box stored in Parquet
196168
follows the de facto standard for axis order in WKB and is therefore always
197169
(x, y) where x is easting or longitude and y is northing or latitude. This
198170
ordering explicitly overrides the axis order as specified in the CRS.
199-
200-
# Special geospatial values
201-
202-
A special geospatial value refers to an individual scalar value (e.g., X, Y, Z,
203-
or M) within a coordinate of a non-`null` geospatial instance. These special
204-
values are excluded from bounding box calculations. For example, in a
205-
`LineString` instance with XY coordinates `[(1, 2), (NaN, 3), (4, 5)]`, the
206-
`NaN` value on the X axis will be excluded from the bounding box calculation,
207-
while all other scalar values will be included.
208-
209-
* `NaN`: Not a Number. A `Point` with no X and Y values in WKB is
210-
represented by a `Point` with each scalar value set to an IEEE-754
211-
NaN value (e.g., hex: `01 01 00 00 00 00 00 00 00 00 00 00 f8 7f 00 00 00 00 00 00 f8 7f`).
212-
NaN values in other geometry types are typically considered invalid
213-
geometries by other libraries.
214-
* `Empty geometries`: Geometries explicitly marked as empty in WKB using
215-
indicators such as `numPoints`, `numRings`, or `numGeometries`. Examples
216-
include `LineString` with no coordinates (hex: `01 02 00 00 00 00 00 00
217-
00`) or `Polygon` with no coordinates (hex: `01 03 00 00 00 00 00 00 00`).
218-
* `Out-of-bounds coordinates`: Values that fall outside the valid range
219-
for `GEOGRAPHY` types. For example, `x < -180` or `x > 180`.
220-
* Any invalid WKB representation of a geospatial instance, such as an empty
221-
string.

0 commit comments

Comments
 (0)