[GRASS-user] Raster Mask under version 7 causes map to go white

Hi Everyone,

I am having an issue that I can’t seem to resolve using the beta2 version under both Windows or Linux, as well as daily snapshots under the Ubuntu version.

Basically, a raster mask file that I am using under the current version of grass 7 beta “blanks” out the underlying raster- that is the entire display area is white, although both rasters (my raster map and the mask) appear as layers. If I remove the mask, the map area is again entirely visible. It worked correctly back in December with the stable version as well as the snapshot of version 7 (then). Now the mask only works under 6.4.
I am have looked on the website and the documentation to see if there were any changes made to raster masks, but am unable to find any changes. I might have missed it though.
Does anyone have a theory about what is going on? The mask would take a considerable amount of work (perhaps a week, as it did the first time) to recreate.
There are some features in 7 that I wanted to use, otherwise I would go back to version 6.4. (specifically, histograms do not work correctly for me under the old version.)
Chris

Sent from Windows Mail

Chris,

On Thu, Jun 19, 2014 at 3:32 AM, <cboscari@sbcglobal.net> wrote:

Hi Everyone,

I am having an issue that I can’t seem to resolve using the beta2 version
under both Windows or Linux, as well as daily snapshots under the Ubuntu
version.

Basically, a raster mask file that I am using under the current version of
grass 7 beta “blanks” out the underlying raster- that is the entire display
area is white, although both rasters (my raster map and the mask) appear as
layers. If I remove the mask, the map area is again entirely visible.

Did you actually query the map(s)?

It worked correctly back in December with the stable version as well as the
snapshot of version 7 (then). Now the mask only works under 6.4.
I am have looked on the website and the documentation to see if there were
any changes made to raster masks, but am unable to find any changes.

The raster mask management is pretty much the same for years.

Perhaps it is just related to the color table you use?

Markus

I am not sure what you mean by “query” the map- under 6.4.3, when I open my map with the mask file in my mapset, the map raster appears with the sections I want visible, the sections I don’t want are not visible and excluded from calculations. This is I think the expected behavior?
Under the beta 2 in both Windows and Linux (Ubuntu Trusty) I have tried changing the color table on the underlying map raster but get the same result- opening the raster with the mask present in the mapset blanks out everything, removing the mask displays the entire raster. The color table I’m using is greyscale. The mask is just 0 and 1’s, but I tried changing the color table there, no difference. If I delete the mask file, the entire underlying raster is displayed.
I verified the mask does contain both 0’s and 1’s, and like I said, it does work fine under 6.4.
So I am stumped.
Chris

Sent from Windows Mail

From: Markus Neteler
Sent: ‎Thursday‎, ‎June‎ ‎19‎, ‎2014 ‎10‎:‎21‎ ‎PM
To: Christopher Boscarino
Cc: grass-user@lists.osgeo.org

Chris,

On Thu, Jun 19, 2014 at 3:32 AM, cboscari@sbcglobal.net wrote:

Hi Everyone,

I am having an issue that I can’t seem to resolve using the beta2 version
under both Windows or Linux, as well as daily snapshots under the Ubuntu
version.

Basically, a raster mask file that I am using under the current version of
grass 7 beta “blanks” out the underlying raster- that is the entire display
area is white, although both rasters (my raster map and the mask) appear as
layers. If I remove the mask, the map area is again entirely visible.

Did you actually query the map(s)?

It worked correctly back in December with the stable version as well as the
snapshot of version 7 (then). Now the mask only works under 6.4.
I am have looked on the website and the documentation to see if there were
any changes made to raster masks, but am unable to find any changes.

The raster mask management is pretty much the same for years.

Perhaps it is just related to the color table you use?

Markus

“The mask is just 0 and 1’s”
you must use null and non null

Enviado con Aquamail para Android
http://www.aqua-mail.com

El 20 de junio de 2014 09:33:34 cboscari@sbcglobal.net escribio:

I am not sure what you mean by “query” the map- under 6.4.3, when I open my map with the mask file in my mapset, the map raster appears with the sections I want visible, the sections I don’t want are not visible and excluded from calculations. This is I think the expected behavior?
Under the beta 2 in both Windows and Linux (Ubuntu Trusty) I have tried changing the color table on the underlying map raster but get the same result- opening the raster with the mask present in the mapset blanks out everything, removing the mask displays the entire raster. The color table I’m using is greyscale. The mask is just 0 and 1’s, but I tried changing the color table there, no difference. If I delete the mask file, the entire underlying raster is displayed.
I verified the mask does contain both 0’s and 1’s, and like I said, it does work fine under 6.4.
So I am stumped.
Chris

Sent from Windows Mail

From: Markus Neteler
Sent: ‎Thursday‎, ‎June‎ ‎19‎, ‎2014 ‎10‎:‎21‎ ‎PM
To: Christopher Boscarino
Cc: grass-user@lists.osgeo.org

Chris,

On Thu, Jun 19, 2014 at 3:32 AM, cboscari@sbcglobal.net wrote:

Hi Everyone,

I am having an issue that I can’t seem to resolve using the beta2 version
under both Windows or Linux, as well as daily snapshots under the Ubuntu
version.

Basically, a raster mask file that I am using under the current version of
grass 7 beta “blanks” out the underlying raster- that is the entire display
area is white, although both rasters (my raster map and the mask) appear as
layers. If I remove the mask, the map area is again entirely visible.

Did you actually query the map(s)?

It worked correctly back in December with the stable version as well as the
snapshot of version 7 (then). Now the mask only works under 6.4.
I am have looked on the website and the documentation to see if there were
any changes made to raster masks, but am unable to find any changes.

The raster mask management is pretty much the same for years.

Perhaps it is just related to the color table you use?

Markus

  "The mask is just 0 and 1’s"
you must use null and non null

​Or maybe try with "maskcats=1" as an aditional parameter on the r.mask
command, in any case you can do this:

r.mapcalc exp="MASK​

​= if(MASK == 0, null(), 1)"

--
*César Augusto Ramírez Franco*
Laboratorio de Sistemas Complejos Naturales
Escuela de Geociencias
Facultad de Ciencias
Universidad Nacional de Colombia - Sede Medellín
Teléfono: (57-4) 430 9369 - 30
​0 459 6085

From the documentation, I understood 0 is one form of the NULL representation for the mask, with other values representing non-masked areas.

“Grid cells in the MASK map containing 0 or NULL will replace data with NULL, while cells containing other values will allow data to pass through unaltered. ”

Sent from Windows Mail

From: jctorres
Sent: ‎Friday‎, ‎June‎ ‎20‎, ‎2014 ‎1‎:‎01‎ ‎AM
To: Christopher Boscarino, grass-user@lists.osgeo.org

“The mask is just 0 and 1’s”
you must use null and non null

Enviado con Aquamail para Android
http://www.aqua-mail.com

El 20 de junio de 2014 09:33:34 cboscari@sbcglobal.net escribio:

I am not sure what you mean by “query” the map- under 6.4.3, when I open my map with the mask file in my mapset, the map raster appears with the sections I want visible, the sections I don’t want are not visible and excluded from calculations. This is I think the expected behavior?
Under the beta 2 in both Windows and Linux (Ubuntu Trusty) I have tried changing the color table on the underlying map raster but get the same result- opening the raster with the mask present in the mapset blanks out everything, removing the mask displays the entire raster. The color table I’m using is greyscale. The mask is just 0 and 1’s, but I tried changing the color table there, no difference. If I delete the mask file, the entire underlying raster is displayed.
I verified the mask does contain both 0’s and 1’s, and like I said, it does work fine under 6.4.
So I am stumped.
Chris

Sent from Windows Mail

From: Markus Neteler
Sent: ‎Thursday‎, ‎June‎ ‎19‎, ‎2014 ‎10‎:‎21‎ ‎PM
To: Christopher Boscarino
Cc: grass-user@lists.osgeo.org

Chris,

On Thu, Jun 19, 2014 at 3:32 AM, cboscari@sbcglobal.net wrote:

Hi Everyone,

I am having an issue that I can’t seem to resolve using the beta2 version
under both Windows or Linux, as well as daily snapshots under the Ubuntu
version.

Basically, a raster mask file that I am using under the current version of
grass 7 beta “blanks” out the underlying raster- that is the entire display
area is white, although both rasters (my raster map and the mask) appear as
layers. If I remove the mask, the map area is again entirely visible.

Did you actually query the map(s)?

It worked correctly back in December with the stable version as well as the
snapshot of version 7 (then). Now the mask only works under 6.4.
I am have looked on the website and the documentation to see if there were
any changes made to raster masks, but am unable to find any changes.

The raster mask management is pretty much the same for years.

Perhaps it is just related to the color table you use?

Markus

It looks like I figured out what is going on…

The mask file was having the non-null areas interpreted as “No Data” and the Null areas were seen as “0” in version 7. This blanked out everything. I ran it through raster calculator and now it is back to normal.
Haven’t a clue why the mask works under 6.4 and not 7.

···

“The mask is just 0 and 1’s”

you must use null and non null

​Or maybe try with “maskcats=1” as an aditional parameter on the r.mask command, in any case you can do this:

r.mapcalc exp=“MASK​
​= if(MASK == 0, null(), 1)”

César Augusto Ramírez Franco

Laboratorio de Sistemas Complejos Naturales

Escuela de Geociencias

Facultad de Ciencias

Universidad Nacional de Colombia - Sede Medellín

Teléfono: (57-4) 430 9369 -30
​0 459 6085