[GRASSLIST:2298] Re: s.surf.rst generating seemingly empty rasters

Glynn Clements glynn.clements at virgin.net
Wed Jan 21 00:13:56 EST 2004


Matthew Tennant wrote:

> This occurs on the Windows port of GRASS (5.0.2) using the cygwin 
> environment and XWindows driver
> 
> No matter what I try, it seems that when I use s.surf.rst to produce a 
> raster file from my sites file (hg1), I produce trashed rasters that for 
> example have a size of 0 bytes in the cell directory in the mapset.

s.surf.rst creates floating-point maps. These have a zero-byte file in
the "cell" directory, with the actual data in the "fcell" directory.

> I tried using g.region sites=hg1 to change the region but to no avail.
> The actual s.surf.rst process works OK, discarding only 4 of my points, 
> including the rest, and taking some time to complete because of the 
> relatively high resolution.
> If I then try to display the raster I've created I get the error message
> Warning: Fail of initial read of compressed file [hg1 in PERMANENT]
> Warning: unable to open raster map [hg1 in PERMANENT]
> Error: Not able to open cellfile for [hg1]

The most common reason for this error on Windows is that the data
files are stored on a Cygwin "filesystem" which performs automatic
LF<->CRLF translation. This will corrupt binary data files.

Either add "binmode" to the setting of the CYGWIN environment
variable, or use the "mount" program to change the filesystem type to
"binary".

Note: any maps which were created on a "text" filesystem will be
corrupted, and will have to be re-created (i.e. you need to run
s.surf.rst again).

Also, GRASS modules which read text files won't normally accept files
with CRLF line terminators, so you can't use Notepad etc to
create/edit them. Either use a Cygwin-based program such as vi, or a
text editor which allows explicit control of line terminators.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list