Thanks Roger,
I finally found the solution. It was indeed in the organization of the
input file.
Best regards
Maxime
Le 27/09/2010 17:37, Roger Bivand a écrit :
On Mon, 27 Sep 2010, Maxime Pauwels wrote:
If you want to test the input, please find it here:
https://bigfile.univ-lille1.fr/get?k=sgVm6qmUdiCddAJlpzh
image(rangerp)
image(imgrp)
suggest that contour() will fail, as it does. Are you sure that the
input data are correctly organised?
Roger
Maxime
Le 27/09/2010 13:34, Roger Bivand a écrit :
On Mon, 27 Sep 2010, Maxime Pauwels wrote:
Hi list,
I have a message error using contourLines and ContourLines2SLDF
functions (maptools package).
rangerp<-read.table("NAhalleri.txt", header=T)
coordinates(rangerp)=~long+lat
gridded(rangerp)=TRUE
proj4string(rangerp)<-CRS("+proj=longlat")
imgrp<-as(rangerp,"SpatialGridDataFrame")
img1rp<-as.image.SpatialGridDataFrame(imgrp["V1"])
CLrp<-contourLines(img1rp, levels=0.0000878882)
CLSLrp<-ContourLines2SLDF(CLrp)
/Error in ContourLines2SLDF(CLrp) : cL too short/
Could anyone help understant what happens?
The levels= value is outside the range of values in img1rp:
library(maptools)
image(volcano)
summary(c(volcano))
CLrp <- contourLines(volcano, levels=70)
CLSLrp<-ContourLines2SLDF(CLrp)
# error
CLrp <- contourLines(volcano, levels=170)
CLSLrp<-ContourLines2SLDF(CLrp)
plot(CLSLrp, add=TRUE)
# OK
Hope this helps,
Roger
Can the input table be too long (3 columns, but almost 300 000 lines)?
Many thanks,
Maxime
Maxime Pauwels
Researcher ID: http://www.researcherid.com/rid/A-1745-2009
Laboratoire de G?n?tique et Evolution des Populations V?g?tales
FRE CNRS 3268
Universit? de Lille, USTL-Lille1
http://gepv.univ-lille1.fr
Tel : +33 3 20 33 62 38
Fax : +33 3 20 43 69 79
?Impose ta chance, serre ton bonheur et va vers ton risque. A te
regarder, ils s'habitueront.?
Ren? Char
[[alternative HTML version deleted]]
--
Maxime Pauwels
Researcher ID: http://www.researcherid.com/rid/A-1745-2009
Laboratoire de Génétique et Evolution des Populations Végétales
FRE CNRS 3268
Université de Lille, USTL-Lille1
http://gepv.univ-lille1.fr
Tel : +33 3 20 33 62 38
Fax : +33 3 20 43 69 79
«Impose ta chance, serre ton bonheur et va vers ton risque. A te regarder, ils
s’habitueront.»
René Char
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo