[GRASSLIST:5143] re-classifying raster values

Hi!

I was wondering if anyone has tried to re-classify the values of a continuous
raster image with a method known as "natural breaks' in the ESRI world, or
any other statistical technique for that matter. I was hoping to try some of
the methods talk about on this website;
http://www.geovista.psu.edu/grants/dg-qg/classing_epi/summary.html

Would it be possible to computer the class intervals in GRASS, or would this
have to be done in a stats package like R?

Many thanks,

--
Dylan Beaudette
Soil Science Graduate Group
University of California at Davis

On Mon, 13 Dec 2004, Dylan Beaudette wrote:

Hi!

I was wondering if anyone has tried to re-classify the values of a continuous
raster image with a method known as "natural breaks' in the ESRI world, or
any other statistical technique for that matter. I was hoping to try some of
the methods talk about on this website;
http://www.geovista.psu.edu/grants/dg-qg/classing_epi/summary.html

Would it be possible to computer the class intervals in GRASS, or would this
have to be done in a stats package like R?

I've some results on this in a paper written in March using R:

http://spatial.nhh.no/papers/aag04.pdf

where the interesting bits are using stats in R to try out natural breaks
- references in the paper. The best solution to date is the R bclust()
function for bagged clustering in package e1071, because it combines the
strength of kmeans() and hiearchical clustering, allowing a post-fitting
choice of number of classes. The same method is used in the course notes
on this page: http://spatial.nhh.no/geo304/modules-h04.html - look under
week 39. The interesting geovista reference is: Armstrong, M.~P., Xiao,
N., Bennett, D.~A., 2003. {Using genetic algorithms to create
multicriteria class intervals for choropleth maps}. {Annals, Association
of American Geographers}, 93 (3), {595--623}.

Straight-in coded natural breaks run into the combinatorical problem that
there are millions of possible maps for each number of classes (above
trivially small numbers like 1 or 2).

I've found bclust() very good - if there is too little data, the trick in
the lecture notes of including a jittered replicate of the original data
usually helps. I also like displaying an empirical cumulative distribution
function to "see" the class intervals. R startup is getting better too.
With a little pushing, making a tcltk display in R run from GRASS is
doable to help choose class intervals.

A discussion on some of these cognitive issues woulkd be valuable,

Roger

Many thanks,

--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand@nhh.no

Hi again,

Thanks for the quick response Stephan. I had a closer look at the problem. The compile script doesn't seem to be finding the location of the header files to install in the architecure-specific folder used to store the compiled executables and libraries. I am compiling on Solaris 10 x86. I have included the last part of the configure script output showing how I have configured the grass build. Below that is a snippet from the beginning of the compilation. Earlier I thought that the problem was that the grass libraries were not being found, hence my question regarding the 5.x source code. They were not found because they were not built due to the failure to install the headers.

The error below reads:

install -m 644 ../include/*.h /usr/local/grass57_exp_2004_12_13/dist.i386-pc-solaris2.10/include/
install: CC.h was not found anywhere!

I have checked and the file exists and the paths are correct, so I don't quite get what is going on. I am still at work so I can't look into this in any detail until tonight. But if anyone has an idea off the top of their head, I would sure appreciate the help!

Thanks,

Eliot Cline

GRASS is now configured for: i386-pc-solaris2.10

Source directory: /usr/local/grass57_exp_2004_12_13
Build directory: /usr/local/grass57_exp_2004_12_13
Installation directory: /usr/local/grass-5.7.cvs
Startup script in directory: ${exec_prefix}/bin
C compiler: gcc -g -O2
C++ compiler:
FORTRAN compiler:
Building shared libraries: yes

  NVIZ: yes

  X11 support: yes
  JPEG support: yes
  TIFF support: yes
  PNG support: yes
  Tcl/Tk support: yes
  PostgreSQL support: yes
  MySQL support: no
  OpenGL(R) support: yes
  ODBC support: no
  FFTW support: no
  BLAS support: no
  LAPACK support: no
  Motif support: no
  FreeType support: no
  GLw support: no
  NLS support: no
  Readline support: no
  C++ support: no
  openDWG support: no
  GDAL support: yes
  OGR support: yes

make[1]: Entering directory `/usr/local/grass57_exp_2004_12_13/lib'
if [ ! -d /usr/local/grass57_exp_2004_12_13/dist.i386-pc-solaris2.10/include ]; then mkdir -p /usr/local/grass57_exp_2004_12_13/dist.i386-pc-solaris2.10/include; fi
if [ ! -d /usr/local/grass57_exp_2004_12_13/dist.i386-pc-solaris2.10/include/vect ]; then mkdir -p /usr/local/grass57_exp_2004_12_13/dist.i386-pc-solaris2.10/include/vect; fi
install -m 644 ../include/*.h /usr/local/grass57_exp_2004_12_13/dist.i386-pc-solaris2.10/include/
install: CC.h was not found anywhere!
make[1]: *** [headers] Error 2