opengeospatial / geoparquet

Specification for storing geospatial vector data (point, line, polygon) in Parquet
https://geoparquet.org
Apache License 2.0
795 stars 56 forks source link

No definition for entire world #243

Open mapprehension opened 1 month ago

mapprehension commented 1 month ago

The spec does not state how to denote the entire world. None of the supported geometry_types suffice if the CRS is spheroidal and the edge type is spherical. With a planar edge type, a hacky, conventional way to specify the whole world is to give a ((-180, 90), (-180, -90), (180, -90), (180, 90), (-180, 90)) bounding box, but this is not a reasonable method for a spherical edge type because there is no boundary on the sphere, and two of those “lines” —the poles — are merely points. If you want to carve out a tiny region (such as a 1 m x 1m plot of ocean) and then use a polygon that excludes just that region, then you would have nearly the entire earth, and in the limit, you would have the entire earth, but this is awkward and ad hoc, which means it would be hard for systems to recognize during ingestion.

paleolimbot commented 1 month ago

Could the bounding box be omitted in the case?

mapprehension commented 1 month ago

I don’t mean the bbox attribute. I mean that there is no polygon (or any other geometry_type or combination of geometry_types) that represents the entire earth in the spheroidal topology. In the flat-earth topology, it is common to use a bounding box polygon (again, not talking about the bbox attribute) to represent the entire globe. That would be a nonsensical representation on the globe.

paleolimbot commented 1 month ago

Ah, sorry. I believe that's a limitation of WKB. @edzer has been trying to formalize this! I tend to prefer POLYGON ((-180 -90, 0 -90, 180 -90, 180 0, 180 90, 0 90, -180 90, -180 0, -180 -90)) because I found that S2 had some problems with edges larger than a quarter of the sphere. S2's internal representation is POLYGON ((0 -90, 0 -90)), although I forget if it knows that it's a full polygon on ingest or whether you have to detect that specific case.