[R-sig-Geo] Problem with rasterFromXYZ

Camille Leclerc camille.leclerc at ymail.com
Thu Mar 15 16:27:39 CET 2012


Hi everybody,

I have a problem with the function "rasterFromXYZ". I have a matrix which
contain, on each rows, x/y coordinates and a z value (for me it's called
DM). And so I used "rasterFromXYZ" function to create a RasterLayer but when
I used this function I had an error message : "y cell size are not regular".
I don't understand my mistake because I've used this function and everything
was OK.

Thank you very much for all help,
Camille

An excerpt from my script :
My matrix (whc.global.obj) which contain x,y,z data

dfbiocfid	dfbiocfy	dfbiocfx      DM
1	        -10.75000  142.5833    204.00917
2	        -10.91667  142.4167    192.94587
3	        -10.91667  142.5833    195.98638
4               -11.08333 132.5833    50.87249
5               -11.08333 142.2500    164.30234
6                ...

xyz<-cbind(whc.global.obj[,3],whc.global.obj[,2],whc.global.obj[,4])
whc<-rasterFromXYZ(xyz)

--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Problem-with-rasterFromXYZ-tp7375920p7375920.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list