ODP: [GRASS-user] MOLA data elevation problem

Maciej Tomaszczyk mtom at pgi.gov.pl
Tue Feb 6 09:53:11 EST 2007


Dear Laurent

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
best regards
maciej

Maciej Tomaszczyk
Polish Geological Institute
Geological Mapping Department



-----Wiadomość oryginalna-----
Od: laurent.caribou at free.fr [mailto:laurent.caribou at free.fr]
Wysłano: Wt 2007-02-06 14:49
Do: Maciej Tomaszczyk
DW: grassuser at grass.itc.it
Temat: Re: [GRASS-user] MOLA data elevation problem
 
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
>
>
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20070206/8ef0c95c/attachment.html


More information about the grass-user mailing list