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

Eric Goddard egoddard1010 at gmail.com
Fri Aug 2 12:50:30 PDT 2013


OK, I discovered what was different between my work and home machines.
The mapcalc if statement doesn't evaluate properly if using
r.external.out. If r.external isn't used, it evaluates correctly. Bug?

On Fri, Aug 2, 2013 at 8:38 AM, Eric Goddard <egoddard1010 at gmail.com> wrote:
> 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:
>
> version=7.0.svn
> date=2013
> revision=56943
> build_date=2013-08-01
>
>  ./configure  --prefix=/usr/local/grass70 --with-postgres=yes
> --with-postgres-includes=/usr/include/postgresql --enable-largefile
> --with-sqlite --with-freetype=yes
> --with-freetype-includes=/usr/include/freetype2
> --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
> http://osgeo-org.1560.x6.nabble.com/seemingly-random-errors-in-r-mapcalc-td5070327.html
> ? 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