[R-sig-Geo] redundancy of coordinates of pixels

Komine momadou at yahoo.fr
Mon Jan 9 21:17:14 CET 2012


Hi,
I have in a matrix 1 255 153 rows and corresponding to the coordinates of
burned pixels on 10 years. The coordinates are in UTM. I want to know the
pixels burned several times on the 10 years. However, less 1% of my pixels
were burned on the 10 years. It seems false. My code uses the center of
pixels, in this case, a same area can burn several times in the 10 years,
but because the center of pixels differ little one year to another, the code
will not show correctly me the pixels which burn each year. Because the code
required that the pixels have EXACTELY the same cordinates.  
Do you known a solution with R to resolve this problem?  
My Code: 
>redon<-read.table("C:\\Users\\Documents\\\\PixelFire.txt",sep="",dec=",",header=TRUE)
>XY <- redon[c("X", "Y")]  
>Z<-xtabs(~apply(XY,1,paste,collapse="-")) 
>Z2<-matrix(unlist(strsplit(names(Z),"-")),ncol=2,byrow=T) 
>Matrice<-data.frame(Z2,freq=Z[])
>write.table(Matrice,"C:\\Users\\Desktop\\Matrice.txt",sep=" ")

Sorry for my bad English!
Thank you in advance 


--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/redundancy-of-coordinates-of-pixels-tp7169408p7169408.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list