ODP: [GRASS-user] MOLA data elevation problem

Hamish hamish_nospam at yahoo.com
Tue Feb 6 17:35:35 EST 2007


Maciej Tomaszczyk wrote:
> > I have problem with MOLA data, i managed to import MOLA binary file
> > to grass using r.in.bin
> > but some cells seems to have invalid values (see pictures in
> > attachment). Anyone know how to solve this problem??? and set
> > correct elevation values. Thanks in advance

Laurent wrote:
> It seems that your file contains negative values. They are coded with
> the values form 32768 to 65535 with 32765 meaning -32768 and 65535
> meaning -1 (you can see in your histogram that you have values in the
> low value (0...) which are the positive values and in the high values
> (...65535) which are the negative values (-1...).

Maciej wrote:
> There is in r.in.bin a -s flag(high bit means negative value) but when
> i used it, effect was the same. The r.mapcalc fixed it. Now everything
> is ok. Thanks for your advice

Glad it is working. FYI in an article in GRASSNews vol 1 (page 11) I use
this r.in.bin command to load in MOLA data:

GRASS:~ > r.in.bin input=megt90n000fb.img \
    title="MGS/MOLA Gridded Data, 1/32 degree" \
    output=mars_mola_32 -b bytes=2 rows=5760 \
    cols=11520 n=90N s=90S e=180E w=180W


Hamish




More information about the grass-user mailing list