[R-sig-Geo] R-sig-Geo Digest, Vol 68, Issue 18

evion12000 at gmail.com evion12000 at gmail.com
Sat Apr 18 14:21:30 CEST 2009


Este mensaje ha sido enviado gracias al servicio BlackBerry de Movilnet

-----Original Message-----
From: r-sig-geo-request at stat.math.ethz.ch

Date: Sat, 18 Apr 2009 12:00:04 
To: <r-sig-geo at stat.math.ethz.ch>
Subject: R-sig-Geo Digest, Vol 68, Issue 18


Send R-sig-Geo mailing list submissions to
	r-sig-geo at stat.math.ethz.ch

To subscribe or unsubscribe via the World Wide Web, visit
	https://stat.ethz.ch/mailman/listinfo/r-sig-geo
or, via email, send a message with subject or body 'help' to
	r-sig-geo-request at stat.math.ethz.ch

You can reach the person managing the list at
	r-sig-geo-owner at stat.math.ethz.ch

When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-Geo digest..."


Today's Topics:

   1. image classification in R (Corey Sparks)
   2. Re: image classification in R (Edzer Pebesma)
   3. Re: image classification in R (Hengl, T.)
   4. Re: image classification in R (Edzer Pebesma)
   5. Converting Tessellation objects into shape files
      (Adalberto Pineda)
   6. Re: image classification in R (Marcel Austenfeld)


----------------------------------------------------------------------

Message: 1
Date: Fri, 17 Apr 2009 09:57:23 -0500
From: Corey Sparks <corey.sparks at UTSA.EDU>
Subject: [R-sig-Geo] image classification in R
To: r-sig-geo at stat.math.ethz.ch
Message-ID: <EBFB8501-2847-4E75-A1A1-C0559584BEA5 at utsa.edu>
Content-Type: text/plain; charset="US-ASCII"; format=flowed; delsp=yes

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



------------------------------

Message: 2
Date: Fri, 17 Apr 2009 17:32:05 +0200
From: Edzer Pebesma <edzer.pebesma at uni-muenster.de>
Subject: Re: [R-sig-Geo] image classification in R
To: Corey Sparks <corey.sparks at UTSA.EDU>
Cc: r-sig-geo at stat.math.ethz.ch
Message-ID: <49E8A0F5.1000609 at uni-muenster.de>
Content-Type: text/plain; charset=ISO-8859-1

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



------------------------------

Message: 3
Date: Fri, 17 Apr 2009 19:49:43 +0200
From: "Hengl, T." <T.Hengl at uva.nl>
Subject: Re: [R-sig-Geo] image classification in R
To: "Corey Sparks" <corey.sparks at UTSA.EDU>
Cc: r-sig-geo at stat.math.ethz.ch
Message-ID: <37382E8DCB905042969BA78541F65706754292 at kwek.ic.uva.nl>
Content-Type: text/plain


Don't forget that you can also use different types of unsupervised classification methods, such as the fuzzy k-means as implemented in the "kmeans" method.

Here is an example (with landform classes):
http://spatial-analyst.net/wiki/index.php?title=Analysis_of_DEMs_in_R%2BILWIS/SAGA

If you work with large grids, consider also using R+SAGA:
https://stat.ethz.ch/pipermail/r-sig-geo/2009-February/005155.html


T. Hengl



-----Original Message-----
From: r-sig-geo-bounces at stat.math.ethz.ch on behalf of Edzer Pebesma
Sent: Fri 4/17/2009 5:32 PM
To: Corey Sparks
Cc: r-sig-geo at stat.math.ethz.ch
Subject: Re: [R-sig-Geo] image classification in R
 
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

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo



	[[alternative HTML version deleted]]



------------------------------

Message: 4
Date: Fri, 17 Apr 2009 23:12:18 +0200
From: Edzer Pebesma <edzer.pebesma at uni-muenster.de>
Subject: Re: [R-sig-Geo] image classification in R
To: "Hengl, T." <T.Hengl at uva.nl>
Cc: r-sig-geo at stat.math.ethz.ch, Corey Sparks <corey.sparks at UTSA.EDU>
Message-ID: <49E8F0B2.9030400 at uni-muenster.de>
Content-Type: text/plain; charset=ISO-8859-1

There's a Task View on clustering, linked from CRAN:

http://cran.r-project.org/web/views/Cluster.html

that will lead you to all types of clustering available, including
hierarchical. I  don't know how well it will work for large data sets
such as images, as it calls for constructing n x n distance matrices,
with n the number of pixels.
--
Edzer

Hengl, T. wrote:
> Don't forget that you can also use different types of unsupervised classification methods, such as the fuzzy k-means as implemented in the "kmeans" method.
>
> Here is an example (with landform classes):
> http://spatial-analyst.net/wiki/index.php?title=Analysis_of_DEMs_in_R%2BILWIS/SAGA
>
> If you work with large grids, consider also using R+SAGA:
> https://stat.ethz.ch/pipermail/r-sig-geo/2009-February/005155.html
>
>
> T. Hengl
>
>
>
> -----Original Message-----
> From: r-sig-geo-bounces at stat.math.ethz.ch on behalf of Edzer Pebesma
> Sent: Fri 4/17/2009 5:32 PM
> To: Corey Sparks
> Cc: r-sig-geo at stat.math.ethz.ch
> Subject: Re: [R-sig-Geo] image classification in R
>  
> 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
>>     
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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



------------------------------

Message: 5
Date: Fri, 17 Apr 2009 14:21:11 -0700
From: "Adalberto Pineda" <apineda at dataquick.com>
Subject: [R-sig-Geo] Converting Tessellation objects into shape files
To: <r-sig-geo at stat.math.ethz.ch>
Message-ID:
	<D53712A05C0B5F44A2F605AF7EB76EFB0117815C at sd1ex1.mscorp.com>
Content-Type: text/plain

Hello, 
I was trying to convert an object of class tess generated using the spatstat package into a shape file, just as shown in this posting: 
 https://stat.ethz.ch/pipermail/r-sig-geo/2009-January/004854.html
Then I tried coercing my object into a owin object as follows:   

owin.points<-as.owin(tess.points),  where tess.points comes from:
centroid.points<-ppp(results$cluster_X, results$cluster_Y, c(-4,4), c(-4,4))  
tess.points<-dirichlet(centroid.points)

but the owin object (owin.points) would only return the tesselation's window and lose other points.
Has anybody found a way to do the conversion?
Any suggestions are welcome, 


Adalberto Pineda
Data Analytics Specialist
MDA Dataquick
9620 Towne Centre Dr.
San Diego, CA.  92121.




This message contains confidential information and is in...{{dropped:8}}



------------------------------

Message: 6
Date: Sat, 18 Apr 2009 08:56:42 +0200
From: Marcel Austenfeld <marcel.austenfeld at uni-bielefeld.de>
Subject: Re: [R-sig-Geo] image classification in R
To: r-sig-geo at stat.math.ethz.ch
Message-ID:
	<20504_1240037805_ZZg0s6z5TPFmX.00_49E979AA.70805 at uni-bielefeld.de>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed

Hello,

I've implemented in my application a GUI for the "clara" algorithm from 
the "cluster" package to cluster image layers
(The layers and clustering results are visualized in ImageJ).
This works quite well for RGB images up to 5000*5000 pixel on a 32-bit 
Windows system.
The standard k-means algorithm works also well but for smaller images.

Cluster Analysis: Max 5000*5000*3(RGB) -> 6 centers: 70sec., 12 centers: 
100s (byte transfer!)

Hardware: AMD Turion 2.0 GHz Dual core, 3Gb RAM Windows Vista 32-bit.

Here is an Example:
http://www.uni-bielefeld.de/biologie/Oekosystembiologie/bio7app/flashtut/cluster.htm


With kind regards

M. Austenfeld



------------------------------

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


End of R-sig-Geo Digest, Vol 68, Issue 18
*****************************************


More information about the R-sig-Geo mailing list