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

karl.sommer at dpi.vic.gov.au karl.sommer at dpi.vic.gov.au
Thu May 25 06:55:47 CEST 2006


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




More information about the R-sig-Geo mailing list