Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grass7:v.rast.stats fails with QGIS >= 3.34.10 #58961

Closed
2 tasks done
a-benini-2 opened this issue Oct 3, 2024 · 2 comments
Closed
2 tasks done

grass7:v.rast.stats fails with QGIS >= 3.34.10 #58961

a-benini-2 opened this issue Oct 3, 2024 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...)

Comments

@a-benini-2
Copy link

a-benini-2 commented Oct 3, 2024

What is the bug or the crash?

After updating QGIS LTR from 3.34.9 to 3.34.10 grass7:v.rast.stats does not calculate univariate statistics from a raster map based on vector polygons. Instead of uploading statistics to new attribute columns, grass7:v.rast.stats returns these new attributes with only NULL s as sole value. Further updating to QGIS LTR 3.34.11 hasn’t helped to overcome this issue. While running grass7:v.rast.stats with a parallel installed QGIS version 3.34.9 works fine.

My operating system is Windows 10.

Steps to reproduce the issue

  1. Go to https://github.com/qgis/QGIS-Sample-Data
  2. Download QGIS-Sample-Data-master.zip on the computer where you have QGIS 3.34.11 installed
  3. unzip QGIS-Sample-Data-master.zip --> QGIS-Sample-Data-master
  4. Open QGIS 3.34.11 and start a new project
  5. Go within folder QGIS-Sample-Data-master to ~\qgis_sample_data\shapefiles\lakes.shp and ~\qgis_sample_data\raster\SR_50M_alaska_nad.tif. Drag and drop these two files / layers into the new QGIS project you just started
  6. Open the Processing Toolbox and search for v.rast.stats
  7. Open v.rast.stats set lakes as vector input and SR_50M_alaska_nad as raster input, specify column prefix, optionally select 1 or more methods and change percentile. Leave Advanced Parameters as they are.
    grafik
  8. Press the Run button and wait until grass7:v.rast.stats has finished. The log should reveal some error:
    log_file_v.rast.stats_QGIS_3.34.11.txt
log_file_v rast stats_QGIS_3 34 11
  1. Inspect attribute table of grass7:v.rast.stats ' s output Rast stats . The new statistic-attributes only consist of NULL s:

attribute_table_2

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS-Version 3.34.11-Prizren QGIS-Codeversion 2904bce
Qt-Version 5.15.13
Python-Version 3.12.6
GDAL-Version 3.9.2
PROJ-Version 9.4.0
EPSG-Registraturdatenbankversion v11.004 (2024-02-24)
GEOS-Version 3.12.2-CAPI-1.18.2
SQLite-Version 3.45.1
PDAL-Version 2.6.3
PostgreSQL-Client-Version 16.2
SpatiaLite-Version 5.1.0
QWT-Version 6.2.0
QScintilla2-Version 2.14.1
BS-Version Windows 10 Version 2009
       
Aktive Python-Erweiterungen
db_manager 0.1.20
grassprovider 2.12.99
MetaSearch 0.3.6
processing 2.12.99
QGIS-Version 3.34.11-Prizren QGIS-Codeversion [2904bce](https://github.com/qgis/QGIS/commit/2904bcec) Qt-Version 5.15.13 Python-Version 3.12.6 GDAL-Version 3.9.2 PROJ-Version 9.4.0 EPSG-Registraturdatenbankversion v11.004 (2024-02-24) GEOS-Version 3.12.2-CAPI-1.18.2 SQLite-Version 3.45.1 PDAL-Version 2.6.3 PostgreSQL-Client-Version 16.2 SpatiaLite-Version 5.1.0 QWT-Version 6.2.0 QScintilla2-Version 2.14.1 BS-Version Windows 10 Version 2009

Aktive Python-Erweiterungen
db_manager
0.1.20
grassprovider
2.12.99
MetaSearch
0.3.6
processing
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

When running grass7:v.rast.stats on QGIS 3.34.10 or QGIS 3.34.11 with different inputs I’ve seen varying error messages returned by the log. But the one thing that was consistent, was that returned statistics attributes only included NULL s.

@a-benini-2 a-benini-2 added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 3, 2024
@agiudiceandrea
Copy link
Contributor

@a-benini-2, thanks for reporting. The issue is not due to QGIS itself. As you can see in the log, the error is due to an issue which prevents the v.rast.stats GRASS-GIS module to correctly process the input raster data:

WARNING: LZ4 decompression error
ERROR: Error uncompressing null data for row 17 of <rast_66feda4aa04625> 

The issue also occurs even directly using GRASS-GIS 8.4.0 installed by the OSGeo4W installer for QGIS 3.34.11 on Windows 10.

The issue didn't occur directly using GRASS-GIS 8.3.2 installed by the OSGeo4W installer for QGIS 3.34.9.

The issue is very likely due to a bug in GRASS-GIS (and should be reported to https://github.com/OSGeo/grass/issues) or in the way GRASS-GIS or some libraries it depends on are built by OSGeo4W (probably @jef-n knows how to check).

@a-benini-2
Copy link
Author

Thanks agiudiceandrea for the quick response. As advised I’ve reported this issue as a bug to https://github.com/OSGeo/grass/issues.

@agiudiceandrea agiudiceandrea closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...)
Projects
None yet
Development

No branches or pull requests

2 participants