[R-sig-Geo] Error in ContourLines2SLDF(CLrp) : cL too short
Terry Griffin
tgriffin at uaex.edu
Mon Sep 27 14:31:18 CEST 2010
-----Original Message-----
From: Roger Bivand <Roger.Bivand at nhh.no>
Sent: Monday, September 27, 2010 6:36 AM
To: Maxime Pauwels <Maxime.Pauwels at univ-lille1.fr>
Cc: r-sig-geo at stat.math.ethz.ch
Subject: Re: [R-sig-Geo] Error in ContourLines2SLDF(CLrp) : cL too short
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]]
>
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
More information about the R-sig-Geo
mailing list