geoarrow / geoarrow-rs

GeoArrow in Rust, Python, and JavaScript (WebAssembly) with vectorized geometry operations
http://geoarrow.org/geoarrow-rs/
Apache License 2.0
254 stars 17 forks source link

What is the correct implementation of an invalid point? #81

Closed kylebarron closed 1 year ago

kylebarron commented 1 year ago

I.e. is a point with coordinates NaN, NaN and the validity bitmask set to true allowed? I.e. a point that exists but is unknown? This is subtly different than the bitmask set to false, which says the point is missing. WKT allows Point Empty I believe

This is probably something to ask on the geoarrow spec repo.

jorisvandenbossche commented 1 year ago

We currently say to use Point(NaN, NaN) to represent an empty point: https://github.com/geoarrow/geoarrow/blob/main/format.md#empty-geometries

That's also what is used for to/from WKB in GEOS and its bindings, given that it has no "POINT EMPTY" WKT equivalent.

kylebarron commented 1 year ago

I think the main goal here (really in https://github.com/kylebarron/geoarrow-rs/issues/84) is to harden the internal handling of empty (but valid) geometries, and check that I'm doing things correctly

kylebarron commented 1 year ago

I'll close to keep focus on #84