[QGIS-Developer] Empty space geometries: do we have a policy ?

Sandro Santilli strk at kbt.io
Fri Oct 20 01:26:31 PDT 2023


During my road to re-evaluation of the 0,0,0,0 rectangle I stumbled
upon a bug in QgsRectangle::fromRect( <null rectangle> ) returning
a Polygon with min/max ordinate values being the double min/max
limits, which is clearly wrong and filed a PR to fix it:

    https://github.com/qgis/QGIS/pull/54954

My fix was to have that function return a "POLYGON EMPTY", which
passed existing tests, but Nyall expressed his preference toward
a "NULL geometry" instead, which triggers failure in the testuite:

    https://github.com/qgis/QGIS/actions/runs/6551411071/job/17798252800?pr=54954#step:13:725

Now, given there seem to be  multiple ways to express emptyness:
is there a written policy about how to deal with them in QGIS ?

What I'm trying to understand is if fixing the failing test is
worth the time it takes, given that PR is just one of the many
PR spun when we stop considering QgsRectangle(0,0,0,0)
a "null rectangle".

Thanks for your advice.

--strk; 

  Libre GIS consultant/developer
  https://strk.kbt.io/services.html


More information about the QGIS-Developer mailing list