[GRASS-user] Filtering high "outliers" in Landsat reflectance imagery?

Eric Goddard egoddard1010 at gmail.com
Fri Aug 2 06:38:26 PDT 2013

On Thu, Aug 1, 2013 at 9:21 PM, Glynn Clements <glynn at gclements.plus.com> wrote:
> Eric Goddard wrote:
>> Hi, I need to do the same thing to some WV-2 imagery. I'm using the command
>> grass.mapcalc("$output = if($input_rast>1.0, 1.0, $input_rast)", output=wv2_out, input_rast=wv2_in)
>> from python (input and output names
>> changed for simplicity) but instead of replacing the values greater
>> than 1 with 1, it replaces them with NaNs.  Is there something wrong
>> with my mapcalc expession?
> No.
> Is there anything unusual about the actual map names? Names containing
> any of the characters
>         ^ # ( ) [ ] + - % > < ! & | ? : ; ~
> need to quoted.

No special characters. An example image name is
x2NOV04172233_M3DS_R6C2_052823926030_01_P001_TOAR.1. The mapcalc
evaluates successfully (and correctly!) on my machine at home. My work
machine is using the following build:


 ./configure  --prefix=/usr/local/grass70 --with-postgres=yes
--with-postgres-includes=/usr/include/postgresql --enable-largefile
--with-sqlite --with-freetype=yes
--with-proj-share=/usr/share/proj --with-python --with-cxx
--with-wxwidgets --with-tcltk-includes=/usr/include/tcl8.5
--with-odbc=yes --enable-64bit --with-geos=yes --with-openmp=yes
--with-liblas=yes --with-cairo=yes --with-opencl=yes --with-pthread

I'll have to bost my home machine's version later today. I compiled
the latest svn yesterday to see if that would resolve the issue, but I
still get null values. Not sure which version I was using before. Any
recommendations on how I may be able to track the error down? I'm
using Ubuntu 13.04 64-bit. I wonder if my issue could be linked to
? Unfortunately my mapcalc operation doesn't actually raise an error
so I don't think Soren's recommendation would help in my case.

More information about the grass-user mailing list