Skip to content

problem with function project() in package rgdal

2 messages · Paul Hiemstra, Renaud Lancelot

#
Hi Renaud,

I don't get the same error, the piece of code runs fine. To which 
version of proj did you build rgdal? My versions are:

Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.4.4.0, released 2007/11/23
Path to GDAL shared files: /usr/share/gdal
Loaded PROJ.4 runtime: Rel. 4.6.0, 21 Dec 2007
Path to PROJ.4 shared files: (autodetected)

Googleing for "major axis or radius = 0 or not given" will give you some 
useful things to start with.

As a remark, I always transform my spatial data to sp-classes (using 
coordinates() or gridded(), see sp-docs) and then use spTransform to 
perform the reprojection.

cheers,
Paul

This is my sessionInfo():

R version 2.9.0 (2009-04-17)
i486-pc-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] rgdal_0.6-5 sp_0.9-29

loaded via a namespace (and not attached):
[1] grid_2.9.0      lattice_0.17-20 tools_2.9.0
Renaud Lancelot wrote:

  
    
#
Dear Paul,

Thank you for you reply. Everything works fine now with the current 
versions of R, rgdal and sp:

 > library(rgdal)
Le chargement a n?cessit? le package : sp
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.6.0, released 2008/12/04
Path to GDAL shared files: C:/R/RLIBS/rgdal/gdal
Loaded PROJ.4 runtime: Rel. 4.6.1, 21 August 2008
Path to PROJ.4 shared files: C:/R/RLIBS/rgdal/proj
 > data(state)
 > res <- project(cbind(state.center$x, state.center$y), "+proj=lcc 
+lat_1=48 +lat_2=33 +lon_0=-100")
 > sessionInfo()
R version 2.9.0 (2009-04-17)
i386-pc-mingw32

locale:
LC_COLLATE=French_France.1252;LC_CTYPE=French_France.1252;LC_MONETARY=French_France.1252;LC_NUMERIC=C;LC_TIME=French_France.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] rgdal_0.6-8    sp_0.9-36      fortunes_1.3-6

loaded via a namespace (and not attached):
[1] grid_2.9.0      lattice_0.17-22 tools_2.9.0

I don't know what happened...

Best regards,

Renaud



Paul Hiemstra a ?crit :