On 26/02/19 02:23, Francois Chartier wrote:
doesnt work with 3d raster. only takes in 2d. i did it with access, more tedious but it works. i should be able to do this with the attribute table directly but havent tried yet.
A raster doesn't have an attribute table, so this is not a solution. r3.mapcalc with nested rules such as this should work:
if(map >=0.01 && map < 0.5, 0.25, if(map < 1, 0.75, if(etc)))
But I do believe that r.reclass and r.recode are fundamental modules that should also exist for r3. So, I would suggest filling in an enhancement request ticket in trac.
Moritz
On Mon, Feb 25, 2019, 05:57 Moritz Lennert <mlennert@club.worldonline.be <mailto:mlennert@club.worldonline.be> wrote:
On 23/02/19 23:16, Francois Chartier wrote:
> What about if i dont want constant spacing but at certain ranges?
Have you tried r.recode as Vero suggested ?
Moritz
>
> Le sam. 23 févr. 2019 à 11:00, Veronica Andreo
<veroandreo@gmail.com <mailto:veroandreo@gmail.com>
> <mailto:veroandreo@gmail.com>> a
écrit :
>
> El sáb., 23 feb. 2019 12:17, Markus Metz
> <markus.metz.giswork@gmail.com
<mailto:markus.metz.giswork@gmail.com>
> <mailto:markus.metz.giswork@gmail.com
<mailto:markus.metz.giswork@gmail.com>>> escribió:
>
> On Sat, Feb 23, 2019 at 1:45 PM Francois Chartier
> <fra.chartier@gmail.com <mailto:fra.chartier@gmail.com>
<mailto:fra.chartier@gmail.com>> wrote:
> >
> > Hi,
> >
> > After creating a raster (2 or 3d) is there a way that
> interpolated values (floats) can be assigned a specific value
> based on range. example: 0.01, 0.2 0.52, 0.67, 0.99, values
> between 0.01 and 0.5 assign 0.25; values between 0.5 and 1,
> assign 0.75.
>
> if you want to assign values to 0.25, 0.75, 1.25, 1.75, etc.,
> i.e. new values with a constant spacing of 0.5, you can use
>
> r.mapcalc "output = round(input, 0.5, 0.25)"
>
> Ah! So cool!! 8)
>
> _______________________________________________
> grass-user mailing list
> grass-user@lists.osgeo.org <mailto:grass-user@lists.osgeo.org>
> https://lists.osgeo.org/mailman/listinfo/grass-user
>