You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
r.stats outputs negative counts when tabulating cell counts across two CELL rasters. Counts should always be >0. The issue seems to happen when rasters are large... I cannot find any other pattern in the rasters that creates this issue (it works as expected for small rasters).
Describe the bug
r.statsoutputs negative counts when tabulating cell counts across twoCELLrasters. Counts should always be >0. The issue seems to happen when rasters are large... I cannot find any other pattern in the rasters that creates this issue (it works as expected for small rasters).To reproduce
Here are the two rasters: https://drive.google.com/drive/folders/1g9PdUt9kVbfVNvSL5GdTSU2O8MsJ0yLy?usp=sharing
I will remove these from this link when the issue is resolved.
Procedure (assume we have created a new project using one of the rasters as a template for the CRS):
Output:
Notice the negative count on line 2.
Expected behavior
Counts should always be >= 0.
System description
System Info
GRASS version: 8.5.0
Code revision: exported
Build date: 2026-06-12
Build platform: x86_64-w64-mingw32
GDAL: 3.13.1
PROJ: 9.8.1
GEOS: 3.14.1
SQLite: 3.53.2
Python: 3.12.13
wxPython: 4.2.5
Platform: Windows-11-10.0.26200-SP0 (OSGeo4W)
3.12.13 (main, Jul 10 2026, 00:56:33) [MSC v.1944 64 bit (AMD64)]
4.2.5 msw (phoenix) wxWidgets 3.2.9