[R-sig-Geo] as.psp don't work for big shapefiles?
Torleif Markussen Lunde
torleif.lunde at cih.uib.no
Thu Mar 26 22:08:25 CET 2009
Hi
I tried to convert a SpatialLinesDataFrame with
dim(var at data)
10615 4
and 153665 coordinate pairs.
It worked fine (as.psp(var)), but took about an hour to run.
sessionInfo()
R version 2.8.1 (2008-12-22)
i386-redhat-linux-gnu
locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] maptools_0.7-20 foreign_0.8-29 sp_0.9-32 spatstat_1.15-0
[5] deldir_0.0-7 gpclib_1.4-3 mgcv_1.4-1.1
loaded via a namespace (and not attached):
[1] grid_2.8.1 lattice_0.17-17
Do you get any error messages? Does traceback() return anything?
This probably did not help, but if you could provide some more information, it
would be nice. You could also start as.psp and abort it (ctrl+c) and run
traceback to see if anything happened.
Best wishes
Torleif
On Thursday 26 March 2009 04:33:05 pm Quentin LEMOULAND wrote:
> Hello,
>
> I have written a code that nead to convert SpatialLinesDataFrame to psp in
> order to use statstat functions.
>
> This functiun works well.
> The problem is that when the shapefile is to big (all the little rivers of
> a region for example: 3000), the as.psp function doesn't return anything
> and var2 is nothing:
>
> if (class(var)=="SpatialLinesDataFrame")
>
> {var at data<-data.frame(c(1:dim(var at data)[1]))
>
> var2<-as(var,"psp")}
>
> When I just select a few rivers (100), no problem.
>
> Does anyone know how to solve it?
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
Torleif Markussen Lunde
Centre for International Health/
Bjernes Centre for Climate Research
University of Bergen, Norway
More information about the R-sig-Geo
mailing list