[R-sig-Geo] image classification in R

Edzer Pebesma edzer.pebesma at uni-muenster.de
Fri Apr 17 17:32:05 CEST 2009


Corey,

you can use functions lda or qda (in library MASS) for linear or
quadratic discriminant analysis, respectively, on your training/ground
truth data, and then use the predict method on the resulting objects,
passing the bands (you need to convert the SpatialGridDataFrame to a
data.frame) as newdata to obtain the classified pixels. Make sure that
the band names have identical name in both cases. Then assign the
predicted class to the SpatialGridDataFrame and export.

It has never been clear to me whether "maximum likelihood
classification" in RS refers to lda or qda. Anyway, it's called
discriminant analysis in the statistical literature.
--
Edzer


Corey Sparks wrote:
> Dear list,
> I want to do some unsupervised image classification of some landsat
> imagery, I think I can read in the multi-band rasters using rgdal, but
> has anyone tried doing this in R?  I am thinking (after looking at
> documentation for how GRASS and ArcGIS do it) that I need to do an
> initial hierarchical clustering to define clusters, but does anyone
> have an idea on how to do a maximum likelihood classification of the
> imagery?  Would a discriminant function approach work?  Any advice
> anyone may have would be greatly appreciated, and i'm very sorry but I
> don't have a working example yet.
> Best
>
> Corey
>
> Corey Sparks
> Assistant Professor
> Department of Demography and Organization Studies
> University of Texas at San Antonio
> One UTSA Circle
> San Antonio, TX 78249
> 210 458 6858
> corey.sparks 'at' utsa.edu
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de/
http://www.springer.com/978-0-387-78170-9 e.pebesma at wwu.de



More information about the R-sig-Geo mailing list