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 all,

I meet a problem with the function project() in package rgdal:

library(rgdal)
data(state)
res <- project(cbind(state.center$x, state.center$y),
+                "+proj=lcc +lat_1=48 +lat_2=33 +lon_0=-100")
Error in project(cbind(state.center$x, state.center$y), "+proj=lcc
+lat_1=48 +lat_2=33 +lon_0=-100") :
  major axis or radius = 0 or not given


sessionInfo()
R version 2.8.1 Patched (2009-02-17 r47956)
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
[7] base

other attached packages:
[1] rgdal_0.6-7    sp_0.9-34      fortunes_1.3-6

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


Is this a bug?



--
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone:  +3130 274 3113 Mon-Tue
Phone:  +3130 253 5773 Wed-Fri
http://intamap.geo.uu.nl/~paul

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to