Dear community
The main aim is to produce a mask of a raster file with data > 0
Code:
r.mask raster=ch_apple_presence_total_pollinator_abundance_spring maskcats=“0.01 thru 1”
ERROR: The raster map <ch_apple_presence_total_pollinator_abundance_spring> must be integer (CELL type) in order to use the ‘maskcats’ parameter
Because of the error I followed the help here:
However, wen running the code suggested with gdal_translate, I got an error
gdal_translate -co "ch_apple_presence_total_pollinator_abundance_spring " ch_apple_presence_total_pollinator_abundance_spring.tif bit_ ch_apple_presence_total_pollinator_abundance_spring.tif
r.null map=ch_apple_presence_total_pollinator_abundance_spring setnull=1
gdal_translate -co ch_apple_presence_total_pollinator_abundance_spring ch_apple_presence_total_pollinator_abundance_spring.tif bit_ ch_apple_presence_total_pollinator_abundance_spring.tif
ERROR 6: Too many command options
‘ch_apple_presence_total_pollinator_abundance_spring.tif’
Usage: gdal_translate [–help] [–help-general] [–long-
usage]
[-ot {Byte/Int8/Int16/UInt16/UInt32/Int32/UInt64/Int6
4/Float32/Float64/
CInt16/CInt32/CFloat32/CFloat64}] [-strict]
[-if ]… [-of ]
[-b ] [-mask ] [-expand {gray|rgb|rgba}]
[-outsize [%]|0 [%]|0] [-tr
]
[-ovr |AUTO|AUTO-|NONE]
[-r
{nearest,bilinear,cubic,cubicspline,lanczos,average,mode}]
[-unscale] [-scale[_bn] [<src_min> <src_max>
[<dst_min> <dst_max>]]]… [-exponent[_bn] <exp_val>]…
[-srcwin ] [-epo] [-eco]
[-projwin ] [-projwin_srs
<srs_def>]
[-a_srs <srs_def>] [-a_coord_epoch ]
[-a_ullr ] [-a_nodata ]
[-a_gt ]
[-a_scale ] [-a_offset ]
[-nogcp] [-gcp
[]]…
|-colorinterp{_bn}
{red|green|blue|alpha|gray|undefined}]
|-colorinterp
{red|green|blue|alpha|gray|undefined},…]
[-mo =]… [-q] [-sds]
[-co =]… [-stats] [-norat] [-noxmp]
[-oo =]…
<src_dataset> <dst_dataset>
Thanks a lot
Sibylle