Skip to content

Fastest method to reclassify large raster.

3 messages · Barry Rowlingson, Philippi, Tom, Robert J. Hijmans

#
On Fri, Sep 13, 2013 at 8:06 AM, Lionel Hertzog <s6lihert at uni-bonn.de> wrote:
This should be trivially parallelizable, so if you have a cluster
handy there should be a way to split the raster and farm out the task
amongst the cluster.

Don't have a cluster? Rent one from Amazon.

Barry
2 days later
#
Nevil,

It seems to me that replacing numbers using a  lookup table of 197000
rows x 80 reclass values for a (not very large) raster of 197000
values can be solved more easily. Unfortunately, you did not provide
code that generates example data; please do so in the future, now you
leave us guessing. Presumably the lookup table column 'Value' is a
cell number. Is so, and if they are sorted, perhaps you can simply do:

b <- brick(r, nl=83)
b <- setValues(b,  mydataOut[,5:88])

Robert
On Fri, Sep 13, 2013 at 8:00 PM, Tom Philippi <tephilippi at gmail.com> wrote: