(PS. I'm putting here a bug report I got by email. My purpose in
doing so is to help other gri users, since the present site is where
folks should expect to find gri help. Dan.)
From: (address removed for privacy)
Subject: GRI Bug(?)report
Date: January 14, 2005 7:28:04 AM AST
To: dankelley@users.sourceforge.net
Hello Dan,
while using GRI I got a message about a bug to be communicated
to you,
here is the output:
GRASS:~/progetti/dem_processing > gri dem0.gri
ERROR: Internal bug with inLine buffer: please report to author.
ERROR: `read grid data' encountered early blank-line or end-of-file
while trying to read line 1 of grid data.
Bad command: `read grid data 285 410'
Error at dem0.gri:2
GRASS:~/progetti/dem_processing >
and I attach the script and the data.
Hoping this helps development of GRI, I thank you very much for
producing Free Software!
Cheers
Alessandro
gri cmd file (data file too large for site)
Logged In: YES
user_id=31559
The
dem0.bin
file appears to be binary. If that's the case, then it must be opened with
a line like
open dem0.bin binary
but, actually, that won't work either, since you appear to have
2 bytes
per data point. (I infer this from your 'read grid' command and the
length of the binary file.)
Gri cannot read 2-byte data. It can read
1-byte
4-byte
etc. For more on the syntax, see
http://gri.sourceforge.net/gridoc/html/Open.html#BinaryFiles
on the web.
If I were you, I'd write a tiny Perl program to transfer your file from the
present form into a form that gri can read. One common choice of file
format is ascii, the advantage being that it can be read on any machine.
But, for speed, you'll likely want to use binary. Just make sure it is in
one of the formats that gri can read; see the URL given above for more
on that.