Opened 14 years ago

Closed 13 years ago

#369 closed defect (fixed)

r.mapcalc not correctly determining null space around r.external data set

Reported by: dickeya Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: Raster Version: 6.4.0 RCs
Keywords: r.external Cc:
CPU: x86-64 Platform: Linux

Description

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.

Attachments (1)

N61E043_small_nd.tif (16.0 KB ) - added by dickeya 13 years ago.
test raster

Download all attachments as: .zip

Change History (6)

by dickeya, 13 years ago

Attachment: N61E043_small_nd.tif added

test raster

comment:1 by dickeya, 13 years ago

Version: svn-develbranch66.4.0 RCs

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.

comment:2 by martinl, 13 years ago

Keywords: r.external added

in reply to:  description comment:3 by glynn, 13 years ago

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

comment:4 by dickeya, 13 years ago

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

in reply to:  4 comment:5 by neteler, 13 years ago

Resolution: fixed
Status: newclosed

Replying to dickeya:

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

Yes. Fixed in r39966.

Note: See TracTickets for help on using tickets.