Opened 12 years ago
Closed 11 years ago
#1718 closed defect (fixed)
r.resamp.rst broken in GRASS 7
Reported by: | rsbivand | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.0 |
Component: | Raster | Version: | svn-releasebranch70 |
Keywords: | r.resamp.rst | Cc: | |
CPU: | Unspecified | Platform: | All |
Description
Running r.resamp.rst fails in 7, succeeds in 6.4.2. In 6.4.2, spearfish, with region set to elevation.dem, this works:
r.resamp.rst --overwrite --verbose input=elevation.dem@PERMANENT ew_res=15 ns_res=15 elev=elev15 Processing all selected output files will require 4719648 bytes of disk space for temp files. Temporarily changing the region to desired resolution ... Changing back to the original region ... Percent complete: dnorm in ressegm after grid before out2= 388.844442 dnorm in mainc after grid before out1= 388.844442 dnorm in mainc after grid before out2= 388.844442 Temporarily changing the region to desired resolution... Changing the region back to initial... r.resamp.rst complete.
In 7 (latest svn up), with region set to elevation.dem:
r.resamp.rst --overwrite --verbose input=elevation.dem@PERMANENT ew_res=15 ns_res=15 elev=elev15 Processing all selected output files will require 4.50 MB of disk space for temp files. Temporarily changing the region to desired resolution ... ERROR: Input window changed while maps are open for read
The error message comes from lib/raster/set_window.c, but the cause may be in raster window handling logic 6/7. This seems to cut in about line 480 in raster/r.resamp.rst/main.c:
Rast_set_window(&outhd);
which calls:
update_window_mappings();
in the library file cited, and triggers the error.
Change History (5)
comment:1 by , 11 years ago
Component: | Default → Raster |
---|---|
Keywords: | r.resamp.rst added |
Platform: | Unspecified → All |
comment:2 by , 11 years ago
Citation from grass-dev:
In 7.x, the RST library isn't working because it hasn't been updated for the new raster window handling (r40772 etc)
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Version: | svn-trunk → svn-releasebranch70 |
Tested successfully in current 7.0.svn:
GRASS 7.0.0svn (spearfish60_grass7):~ > g.region rast=elevation.dem GRASS 7.0.0svn (spearfish60_grass7):~ > r.univar elevation.dem -g n=292317 null_cells=2661 cells=294978 min=1066 max=1840 range=774 mean=1353.66931789804 mean_of_abs=1353.66931789804 stddev=177.040679835105 variance=31343.402316476 coeff_var=13.0785766874004 sum=395700554 GRASS 7.0.0svn (spearfish60_grass7):~ > r.resamp.rst --overwrite --verbose input=elevation.dem@PERMANENT ew_res=15 ns_res=15 elev=elev15 Processing all selected output files will require 4.50 MB of disk space for temp files. Temporarily changing the region to desired resolution ... Changing back to the original region ... Percent complete: 100% dnorm in ressegm after grid before out2= 388.844442 dnorm in mainc after grid before out1= 388.844442 dnorm in mainc after grid before out2= 388.844442 Temporarily changing the region to desired resolution... Changing the region back to initial... r.resamp.rst complete. GRASS 7.0.0svn (spearfish60_grass7):~ > r.univar elev15 -g n=1179912 null_cells=0 cells=1179912 min=1066.04113769531 max=1840.59228515625 range=774.551147460938 mean=1353.60878808034 mean_of_abs=1353.60878808034 stddev=177.077330758482 variance=31356.3810685488 coeff_var=13.0818691720825 sum=1597139252.36145
Closing as fixed.
A discussion on this matter is found in trac #1576.
(I m not sure how to fix this bug)