[winGRASS] WORKAROUND - Compressed Cell File Problems on WinGrass

Mike Thomas miketh at brisbane.paradigmgeo.com
Wed May 23 01:52:53 EDT 2001


Hi all.

You may recall recently that I had problems with compressed raster cell
files a fortnight ago eg:

----------------------------------------------------------------------------
----------------
WARNING: Fail of initial read of compressed file [u2ppm in miketh]
WARNING: unable to open raster map [u2ppm in miketh]
ERROR: Not able to open cellfile for [u2ppm]
----------------------------------------------------------------------------
----------------

I'm pleased to report a:

WORKAROUND:  Ensure that you set the DATABASE: field in the Grass startup
screen to a path which Cygwin believes is under a binary mounted Cygwin
directory, eg: "/cygdrive/e/data".

If, instead, you use the shorthand double-slash path prefix eg "//e/data",
Grass will not work properly.


WHY:  Using GDB I discovered that this occurs when the Cygwin C library
function read () in format.c (libgis) fails to get enough bytes from the
input file.  This seems to be caused by read() operating differently
depending on how the filesystem is referred to in the DATABASE: field in the
Grass 5 startup screen.

If, on startup, I set the DATABASE: field to "//e/data/grass", read()
apparently treats the file read as a text mode read, and when it hits the
first ^Z, stops.

If, however, I set the field to "/cygdrive/e/data/grass", read() returns the
correct number of bytes when accessing CELL files.

Until recently, I had been keeping my data in "/usr/local" so had not come
across this catch.

Cheers

Mike Thomas






More information about the grass-windows mailing list