[GRASS-user] r.mapcalc(nulls into 0)
Eloi Ribeiro
eloi.ribeiro at gmail.com
Wed Jul 11 05:16:25 PDT 2012
Thank you all! Solved.
Eloi Ribeiro
GIS Analyst
39,45º -0,40º
flavors.me/eloiribeiro
2012/7/11 Alberto Pettazzi <alberto.pettazzi meteogalicia.es>
> Hi,
>
> I think you should do
>
> raster2=if(isnull(raster1),0,raster1)
>
> El 11/07/12 14:02, Eloi Ribeiro escribió:
>
> Hi,
>
> I am trying to do something really simple but not finding the right way to
> do it.
> I need to convert nulls into zeros. I have done this:
> *r.mapcalc "raster2 = if(raster1 = null(), 0, raster1)" *
> *r.mapcalc "raster2 = if(raster1 == null(), 0, raster1)" **
> *
> But this convert all cells into nulls.
>
> I have tried another approach with r.reclass, rules:
> null/null()/no data/nodata...=0
> 1=1
> 2=2
> 3=2
> 4=2
> 5=2
>
> No fun, all I get is an ERROR: null/null()/no data/nodata...=0
>
> What I'm doing wrong?
>
> Eloi Ribeiro
> GIS Analyst
> 39,45º -0,40º
> flavors.me/eloiribeiro
>
>
> _______________________________________________
> grass-user mailing listgrass-user lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/grass-user
>
>
>
> --
>
> Alberto Pettazzi
>
>
> MeteoGalicia - Departamento de Climatología y Observación
>
> Consellería de Medio Ambiente, Territorio e Infraestruturas
>
> Rúa de Roma, 6
>
> 15707 Santiago de Compostela. A Coruña
>
>
> Teléfono: +34-881-999646
>
>
> e-mail: alberto.pettazzi meteogalicia.es
>
>
>
> _______________________________________________
> grass-user mailing list
> grass-user lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
-------------- pr?xima parte ----------
Um anexo em HTML foi limpo...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20120711/66e583f0/attachment-0001.html>
More information about the grass-user
mailing list