[R-sig-Geo] problems loading spproj library for transform()

Mulholland, Tom Tom.Mulholland at dpi.wa.gov.au
Thu May 25 07:14:07 CEST 2006


I'm sure Roger or someone will come up with exactly what is going on. A couple of weeks ago I had some problems with spproj. I can't recall all the things that I did but it seemed to be associated with me installing 2.3. I noted that when I tried to update my packages that the sp repository didn't have the correct sub-directories. I can't recall what caused me to compile the sp packages under 2.3, but I did. It solved one problem but then I think it caused another. Eventually I only got a resolution once I removed R completely and reinstalled the packages (2.2) on the 2.3 base. My system is working OK now, but I haven't tried updating the packages for a while.

Sorry I can't remember the specifics, but it was one of those cases where I tried so many things that it all got a bit confused.

The main point is, what versions are you using? and have you done anything related to the sp packages that may have inadvertently caused this issue?

It may or may not be a side issue but I don't really understand if I should be removing spproj as I note that Roger has said that the functionality has moved to Rgdal. It was in a thread about WGS84 to UTM, if my memory serves me. Another of the things to do on the list of "things to get right in R."

Tom

> -----Original Message-----
> From: r-sig-geo-bounces at stat.math.ethz.ch
> [mailto:r-sig-geo-bounces at stat.math.ethz.ch]On Behalf Of
> karl.sommer at dpi.vic.gov.au
> Sent: Thursday, 25 May 2006 12:56 PM
> To: r-sig-geo at stat.math.ethz.ch
> Subject: [R-sig-Geo] problems loading spproj library for transform()
> 
> 
> Hello list
> 
> I have been trying to do a projection conversion from lat lon 
> to a UTM grid
> 
> I followed an example in the April discussion list provided 
> by Roger Bivand
> and adapted it to my own data.
> Everythings seemd to work well up until the transform() 
> method which failed
> to execute.  The failure seems due to a problem
> with loading the "spproj package" but I can't make sense of the error
> messages which are listed below.
> Re-installing spproj did not make a difference.  I am working 
> on a Windows
> system
> 
> Any hints would be appreciated
> 
> Regards
> 
> Karl
> 
> # import of shape file
> wingem38 <- readOGR(dsn = "em38/wing_em38.shp", layer="wing_em38",
> verbose=T)
> 
> read all EPSG definitions into memory
> EPSG <- make_EPSG()
> 
> # extract possible options for UTM zone -54
> EPSG[grep("UTM zone 54S", EPSG$note), 1:2]
> 
> # gives 4 options, select WGS 84 and assign to variable
> utm54S <- CRS("+init=epsg:32754")
> showWKT(CRSargs(utm54S))
> 
> # If shapefiles have a *.prj file already, readOGR() will pick it up.
> # If not, need to assign the input coordinate reference system
> # to the Spatial object(s):
> 
> my_ll <- CRS("+proj=lonlat +datum=WGS84")
> proj4string(wingem38) <- my_ll
> 
> em38utm <- transform(wingem38,  utm54S)
> 
> 
> Loading required package: spproj
> Error in importIntoEnv(impenv, impnames, ns, impvars) :
>       objects 'Sline', 'Sring', 'Srings', 'SpatialRings',
> 'getSRpolygonsSlot', 'getSringsIDSlot', 'getSringsSringsSlot',
> 'getSringCoordsSlot' are not exported by 'namespace:sp'
> r-sig-geo at stat.math.ethz.chError in transform(wingem38, 
> utm54S) : for using
> (coordinate) transform on objects deriving from Spatial, 
> library spproj is
> required
> 
> _______________________________________________
> 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