[R-sig-Geo] Error using spsample on SpatialLines in Linux OS

Glenn Stauffer gestauffer at gmail.com
Thu Apr 26 18:52:50 CEST 2018


Do you mean the sp package? I should have mentioned that I already tried
that.

-----Original Message-----
From: R-sig-Geo [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Edzer
Pebesma
Sent: Thursday, April 26, 2018 11:35 AM
To: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] Error using spsample on SpatialLines in Linux OS

I would try reinstalling the package.

On 04/26/2018 06:31 PM, Glenn Stauffer wrote:
> I ran across a problem when trying to use spsample to sample points 
> along a line, while in a Linux OS (Mint 18.3). The following code 
> (which works fine in Win 10):
> 
>  
> 
> pts <- matrix(c(c(6000,6015,6021,6035,6050),
> c(6000,5995,6000,6040,6095)),5,2,byrow=FALSE)
> L = 
> SpatialLines(list(Lines(list(Line(coordinates(pts))),"X")),proj4string 
> =
> CRS("+init=epsg:3071"))
> plot(L)
> Lsamp <- spsample(L,10,type="regular",offset=0.5) # this is the line 
> that generates the error
> 
>  
> 
> produces the following error:
> 
>  
> 
> Error in .C("sp_lengths", x, y, n, lengths, lonlat, PACKAGE = "sp") : 
>   "sp_lengths" not available for .C() for package "sp"
> 
> Could this be related to some wrong versions of certain dependencies 
> (e.g., GDAL)? I don't know much about that, but I did run into that 
> issue with trying to install other packages (rgeos, sf). In any case, 
> how can I prevent this error?
> 
>  
> 
> Thanks,
> 
> Glenn
> 
>  
> 
>  
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

--
Edzer Pebesma
Institute for Geoinformatics
Heisenbergstrasse 2, 48151 Muenster, Germany
Phone: +49 251 8333081

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list