Re: [Qgis-user] reclass raster nodata=0
Tusentakk Håvard, that works fine! But still wondering why GRASS can reclass a 0=NULL, but not a NULL=0... On 30-12-16 12:46, Havard Tveite wrote: You could use the GRASS function r.null (available in Processing). Håvard On 30. des. 2016 11:35, Raymond Nijssen wrote: I'd like to reclass a raster that contains just cells with values nodata and 1. (I created it by rasterizing a polygon layer.) Now I want to change all nodata values to 0, but I cannot find any way to do this. I tried the grass and gdal tools and the qgis raster calculator, but without luck. Does anyone know? Thanks! Raymond PS In fact I have 2 of these layers and I want to "union" them. So I tried: raster1 OR raster2 in the calculator, but that only returns 1 for the cells that contain a 1 in both input rasters, resulting in the overlapping area. By changing nodata to 0, I'm hoping to calculate: (raster1 + raster2) ^ 0 and get my desired results. Any ideas on this? ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user -- Terglobo Fahrenheitstraat 1 5223 BJ 's-Hertogenbosch 06 25 31 49 83 ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] reclass raster nodata=0
You could use the GRASS function r.null (available in Processing). Håvard On 30. des. 2016 11:35, Raymond Nijssen wrote: I'd like to reclass a raster that contains just cells with values nodata and 1. (I created it by rasterizing a polygon layer.) Now I want to change all nodata values to 0, but I cannot find any way to do this. I tried the grass and gdal tools and the qgis raster calculator, but without luck. Does anyone know? Thanks! Raymond PS In fact I have 2 of these layers and I want to "union" them. So I tried: raster1 OR raster2 in the calculator, but that only returns 1 for the cells that contain a 1 in both input rasters, resulting in the overlapping area. By changing nodata to 0, I'm hoping to calculate: (raster1 + raster2) ^ 0 and get my desired results. Any ideas on this? ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user -- Håvard Tveite Department of Mathematical Sciences and Technology, NMBU Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY Phone: +47 67231548 Fax: +47 64965401 http://www.nmbu.no/imt/ ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] reclass raster nodata=0
I'd like to reclass a raster that contains just cells with values nodata and 1. (I created it by rasterizing a polygon layer.) Now I want to change all nodata values to 0, but I cannot find any way to do this. I tried the grass and gdal tools and the qgis raster calculator, but without luck. Does anyone know? Thanks! Raymond PS In fact I have 2 of these layers and I want to "union" them. So I tried: raster1 OR raster2 in the calculator, but that only returns 1 for the cells that contain a 1 in both input rasters, resulting in the overlapping area. By changing nodata to 0, I'm hoping to calculate: (raster1 + raster2) ^ 0 and get my desired results. Any ideas on this? ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user