[Bug] r.grow requires much more disk space than the size of the input raster

Aperta
#8,147 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, python

Direzione di ricerca

The bug is in the r.grow module, whose source lives under raster/r.grow in the GRASS repository; the report names the euclidean metric and radius 2 as the trigger. Start by reading how the module allocates its temporary distance and output buffers for a raster of about 2.7 billion cells, then reproduce with a small raster and check temp file usage. Done means r.grow completes on the reported input with disk use comparable to the input.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Describe the bug

When running r.grow with a radius of 2px, euclidean metric, on a 2,642,178 KB raster, my 39,375,716 KB of free space are not enough and the algorithm fails with No Space Left On Device.

Raster details :

 |   Type of Map:  raster               Number of Categories: 0               |
 |   Data Type:    CELL                 Semantic label: (none)                |
 |   Rows:         50123                                                      |
 |   Columns:      53967                                                      |
 |   Total Cells:  2704987941                                                 |
 |        Projection: RGF93 v1 / Lambert-93                                   |
 |            N: 6856084.75    S: 6831023.25   Res:   0.5                     |
 |            E:  656500.75    W:  629517.25   Res:   0.5                     |
 |   Range of data:    min = 1  max = 1                                       |
 |                                                                            |
 |   Data Description:                                                        |
 |    generated by r.in.gdal   

To reproduce

  1. run r.grow input="raster", output="raster_grown", radius="2", old=1, new=1)

Same in QGIS using GRASS (except the processing temp file actually occupies all free space and I end up with 0 KB free) and Jupyter Lab using GRASS :

Image

Expected behavior

The processing runs its course and the resulting raster is produced with a size comparable to the input raster size.

System description

  • Operating System: Windows 11
  • GRASS version: 8.5.0 (64Bit)
  • Build date : 2026-06-12
  • Python 3.12.16
  • wxPython 4.2.5

Additional context

Input raster values are either 1 or NoData.

Lingua principale
C
Stelle
1.2k
Fork
447
Merge medio
1g 19h
PR unite (30g)
62

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OSGeo/grass

Tutte le issue di OSGeo/grass

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.