<div>Hi all,</div>
<div> </div>
<div>I am not sure as to which list this best fits (Grass or R-sig-geo).</div>
<div> </div>
<div>I am trying to reclass a raster map (ndvi) into 5 different zones using the fisher method, ultimatley i am trying to reclass as natural breaks.</div>
<div> </div>
<div>The point of this exercise is for precision agriculture. I want to determine management zones according to the current crop, so i can use this information for inputs for next years crop. Therefore i have no use for a range of ndvi values -1 thru 1. I need to split this into a number of zones (5 or 7 is good number, unless i can get an algorithm to determine the exact number of groups it needs). Each zone then in turn needs to be ground truthed (hence need for classifying into 5 or 7 zones).</div>
<div> </div>
<div>My problem at the moment is that the way i am doing it takes a while... I would sure love it if anyone has any suggestions to speed up the process... Is it possible to do the reclass bit in R and export the raster (SpatialDataFrame) back into grass? I have read a post from <span>Roger Bivand on how to do the whole classinterval thing (thank you Roger) however i am unsure of how then to create a new image from those values. </span>I have looked through the sp package breifly but I dont very well understand the R system.</div>
<div> </div>
<div> </div>
<div>Current method (this has to be done for each paddock, or paddocks can be grouped if they have similar management history).</div>
<div> </div>
<div>create ndvi</div>
<div>r.mapcalc 'ndvi=1.0*(nir-red)/(nir+red)'</div>
<div>move ndvi raster to R</div>
<div>-R-R-R-----------------</div>
<div>library(spgrass6)</div>
<div>G <- gmeta6()</div>
<div>ndvi <- readRAST6(<a href="mailto:ndvi@mapset">ndvi@mapset</a>)</div>
<div>library(classInt)</div>
<div>t1 <- classIntervals(ndvi$ndvi.mapset, n=5, style="fisher")</div>
<div>print(t1)</div>
<div>--------------------------------</div>
<div>create text document for reclass rules, multiply everything by 10,000,000 (as reclass will round my numbers)</div>
<div>-----------------------------</div>
<div>back in grass</div>
<div>r.mapcalc ndvi_10M = ndvi * 10000000</div>
<div>r.reclass input=ndvi_10M output=ndvi.reclass rules="rules created in text doc" title="title"</div>
<div> </div>
<div> </div>
<div>I hope this all makes sense. Thank you for your time and reading through my problem. If you have any suggestions i sure would be greatful.</div>
<div> </div>
<div>Kind regards,</div>
<div>Ed</div>