[GRASS-dev] [GRASS GIS] #369: r.mapcalc not correctly determining null space around r.external data set

#369: r.mapcalc not correctly determining null space around r.external data set
---------------------+------------------------------------------------------
Reporter: dickeya | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: Raster | Version: svn-develbranch6
Keywords: | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------
Here's what I'm seeing:

I have a geotiff file that I link to using r.external (output=test_ras). I
set the region to have 1px of null space around the input raster, and then
run:
{{{
r.mapcalc "out_ras = if(isnull(test_ras),0,null())"
}}}

I expect out_rast to have all nulls set to 0, including the 1px buffer.
The north and south borders are correctly detected as null and set to 0,
but the east and west borders are still null in the output.

If I import the same geotiff using r.in.gdal and run the same routine,
everything works as expected and I have a ring of 0s around my new data
set.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/369&gt;
GRASS GIS <http://grass.osgeo.org>

#369: r.mapcalc not correctly determining null space around r.external data set
----------------------+-----------------------------------------------------
  Reporter: dickeya | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Raster | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Changes (by dickeya):

  * version: svn-develbranch6 => 6.4.0 RCs

Comment:

Still seeing this problem - here is my exact workflow:

r.external in=N61E043_small_nd.tif out=N61E043_small_nd
g.region -a n=62.0087569444 s=60.9912430556 w=42.9912430556
e=44.0087569444
r.mapcalc "temp_null=if(isnull(N61E043_small_nd),1,null())"

I should be seeing a continuous ring of nodata around the raster. Instead
I get the first and last row, and none of the first and last column
(except those pixels in the first and last row).

If I run r.in.gdal, the routine works as expected.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/369#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#369: r.mapcalc not correctly determining null space around r.external data set
----------------------+-----------------------------------------------------
  Reporter: dickeya | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Raster | Version: 6.4.0 RCs
Resolution: | Keywords: r.external
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Changes (by martinl):

  * keywords: => r.external

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/369#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#369: r.mapcalc not correctly determining null space around r.external data set
----------------------+-----------------------------------------------------
  Reporter: dickeya | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Raster | Version: 6.4.0 RCs
Resolution: | Keywords: r.external
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Comment (by glynn):

Replying to [ticket:369 dickeya]:

> I expect out_rast to have all nulls set to 0, including the 1px buffer.
The north and south borders are correctly detected as null and set to 0,
but the east and west borders are still null in the output.

This should be fixed by r39889 (7.0) and r39890 (6.4).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/369#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#369: r.mapcalc not correctly determining null space around r.external data set
----------------------+-----------------------------------------------------
  Reporter: dickeya | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Raster | Version: 6.4.0 RCs
Resolution: | Keywords: r.external
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Comment (by dickeya):

I see that r39890 updates develbranch_6 - can this be added to 6.4?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/369#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#369: r.mapcalc not correctly determining null space around r.external data set
----------------------+-----------------------------------------------------
  Reporter: dickeya | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: Raster | Version: 6.4.0 RCs
Resolution: fixed | Keywords: r.external
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Changes (by neteler):

  * status: new => closed
  * resolution: => fixed

Comment:

Replying to [comment:4 dickeya]:
> I see that r39890 updates develbranch_6 - can this be added to 6.4?

Yes. Fixed in r39966.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/369#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>