What's missing
ST_Intersection has no geography overload. docs/api/sql/geography/Geography-Functions/
currently documents ST_Area, ST_AsEWKT, ST_AsText, ST_Buffer, ST_Centroid, ST_Contains,
ST_DWithin, ST_Distance, ST_Envelope, ST_Equals, ST_GeometryType, ST_Intersects, ST_Length,
ST_NPoints, ST_NumGeometries and ST_Within — the overlay operations are absent.
-- wanted
SELECT ST_Area(ST_Intersection(geogA, geogB)); -- spherical overlay, area in m^2
Why
This is the one function blocking the geography form of SpatialBench Q9 (building conflation /
IoU) on Sedona. The query is a polygon self-join that computes
ST_Area(ST_Intersection(a, b)) / (area_a + area_b - overlap); with geography inputs the
areas come back in m² and the IoU is directly interpretable, whereas the planar form yields
square degrees.
Reference
SedonaDB already implements it — ST_Intersection(geography, geography) -> geography — so
there is a reference for the expected semantics.
Part of #2830.
What's missing
ST_Intersectionhas no geography overload.docs/api/sql/geography/Geography-Functions/currently documents ST_Area, ST_AsEWKT, ST_AsText, ST_Buffer, ST_Centroid, ST_Contains,
ST_DWithin, ST_Distance, ST_Envelope, ST_Equals, ST_GeometryType, ST_Intersects, ST_Length,
ST_NPoints, ST_NumGeometries and ST_Within — the overlay operations are absent.
Why
This is the one function blocking the geography form of SpatialBench Q9 (building conflation /
IoU) on Sedona. The query is a polygon self-join that computes
ST_Area(ST_Intersection(a, b)) / (area_a + area_b - overlap); with geography inputs theareas come back in m² and the IoU is directly interpretable, whereas the planar form yields
square degrees.
Reference
SedonaDB already implements it —
ST_Intersection(geography, geography) -> geography— sothere is a reference for the expected semantics.
Part of #2830.