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

Matthew Tennant Matthew.Tennant at MobileInnovation.co.uk
Thu Jan 22 11:08:49 EST 2004


Thanks for all suggestions.
I have created a DOS environment variable, CYGWIN, which is set to 
"binmode".
I have also saved my site file "hg1" in Textpad to be of format UNIX and 
encoding ANSI. 

However, I still get the errors

d.rast map=hg1
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]

I note that in the fcell directory, the file hg1 is actually 392kb, as 
Glynn suggested.

Here's the ouput from the s.surf.rst:-

Warning: strip exists with insufficient data
Warning: points are more dense than specified 'DMIN' -- ignored 4 points.
Warning: there is less than 42 points for interpolation, no segmentation 
is neccessary, to run the
program faster set segmax=42 (see manual)
The number of points in sites file is 37
The number of points outside the region 0
The number of points being used (after reduction) is 33

Processing all selected output files will require 439152 bytes of disk 
space for temp files

100%
Percent complete: history initiated

Any more suggestions out there?




Glynn Clements <glynn.clements at virgin.net> 
Sent by: owner-GRASSLIST at baylor.edu
21/01/2004 05:13


To
"Matthew Tennant" <Matthew.Tennant at MobileInnovation.co.uk>
cc
"GRASSLIST at baylor.edu" <GRASSLIST at baylor.edu>
Subject
[GRASSLIST:2298] Re: s.surf.rst generating seemingly empty rasters







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>


ForwardSourceID:NT00009FEE 




More information about the grass-user mailing list