[GRASS-user] MOLA data elevation problem

laurent.caribou at free.fr laurent.caribou at free.fr
Tue Feb 6 08:49:43 EST 2007


Hello Maciej,

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...).

I don't have Grass right here but you can check wether or not r.in.bin have a
flag to tell him to use to convert negative value.

The other way would be tu use r.mapcalc  with an expression doing the following:
if value<32767 return value ( the positive value kept as is )
else return value-65636 (convert to negative value)

It should be something like (once again, I'm not sure of the syntax and I don't
have access to grass to check):
out=if(value<32767,value,value-65636)

Let me know if it works an,d which solutions use used.

Laurent


Selon Maciej Tomaszczyk <mtom at pgi.gov.pl>:

> Hello Grass Users
>
> 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
> best regards
> maciej
>
> Maciej Tomaszczyk
> Polish Geological Institute
> Geological Mapping Department
>
>
>





More information about the grass-user mailing list