[GRASS-dev] Re: [GRASS GIS] #1006: r.terraflow fails to create temp
file on Windows when launched from wxgui
GRASS GIS
trac at osgeo.org
Sat Mar 27 00:12:28 EDT 2010
#1006: r.terraflow fails to create temp file on Windows when launched from wxgui
------------------------------+---------------------------------------------
Reporter: marisn | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: Raster | Version: svn-releasebranch64
Resolution: | Keywords: wxgui, wingrass, terraflow
Platform: MSWindows Vista | Cpu: x86-32
------------------------------+---------------------------------------------
Comment (by hamish):
are you using the elevation raster map from the NC dataset?
Helmut wrote:
{{{
Reading data from <elevation> to stream
<C:/Users/syringia/AppData/Local/Temp/STREAM_a01828>
C:/Users/syringia/AppData/Local/Temp/STREAM_a01828: length =
17179869184 sizeof(T)=1
C:/Users/syringia/AppData/Local/Temp/STREAM_a01828: length =
17179869184 sizeof(T)=1
Assertion failed: nrows * ncols == str->stream_len(), file
grass2str.h, line 146
}}}
so the value of the buf.st_size variable is filled with garbage.
and sizeof(T) is different from what I get on linux.
for me on 32bit linux I get this output for that line (spearfish's
elevation.dem)
{{{
evelation.dem:
rows: 466
cols: 633
...
MFD flow direction
D8CUT=999999986991104.000000
Memory size: 300.00M (314572800) bytes
Memory manager registering memory in MM_WARN_ON_MEMORY_EXCEEDED mode.
Reading data from <elevation.dem> to stream </var/tmp//STREAM_qylbyz>
100%
/var/tmp//STREAM_qylbyz: length = 1179912 sizeof(T)=4
/var/tmp//STREAM_qylbyz: length = 1179912 sizeof(T)=4
total elements=294978, nodata elements=2661
largest temporary files:
FILL: 15.75M (16518768) [294978 elements, 56B each]
FLOW: 22.30M (23385360) [292317 elements, 80B each]
Will need at least 44.60M (46770720) space available in /var/tmp/
------------------------------
COMPUTING FLOW DIRECTIONS
...
}}}
is stat() on Windows the same as it is on UNIX?
on my version of linux .st_size should be type off_t: "total size, in
bytes", and stat() should return 0 on success and -1 on failure.
is `%lld` the right printf() setting for off_t?
I'm not sure how big <class T> should be, but probably bigger than 1
byte.. ?
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1006#comment:14>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list