[R] Coordinate projection with proj4R: the Albers Equal-AreaConicprojection?

Roger Bivand Roger.Bivand at nhh.no
Mon May 10 23:04:37 CEST 2004


This concerns a draft package not on CRAN, perhaps better discussed off 
list for now. Could you please attach a few example points for me to look 
at, and details of your R version and the proj4 library version you are 
using? What happens when you run proj from the command line?

Roger Bivand

On Mon, 10 May 2004, Slist wrote:

> Hi all!
> 
> I am trying to project coordinates collected by GPS collars. The data is in 
> decimal degrees and provides locations for two Sable antelope running 
> around in Kruger NP South Africa.
> 
> After a wide search it seems that proj4R provides most options for 
> projection of coordinates. However I can not get around the following error 
> message when I try to project my coordinates using the Albers Equal Area 
> Conic projection.
> 
> According to the proj4 pages, the following parameters should be supplied:
> http://www.remotesensing.org/geotiff/proj_list/albers_equal_area_conic.html
> PROJ.4 Organization
>    +proj=aea   +lat_1=Latitude of first standard parallel
>                +lat_2=Latitude of second standard parallel
>                +lat_0=Latitude of false origin
>                +lon_0=Longitude of false origin
>                +x_0=Easting of false origin
>                +y_0=Northing of false origin
> 
> But when running the command in R, I get the following error message
> 
>  > library(proj4R)
>  >
>  > res <- project(cbind(x, y),  "+proj=aea +lon_0=24 +lat_0=0 +lat_1=18s 
> +lat_2=32s +x_0=0 +y_0=0 ") #
> Error in project(cbind(x, y), "+proj=aea +lon_0=24 +lat_0=0 +lat_1=18s 
> +lat_2=32s +x_0=0 +y_0=0 ") :
>          major axis or radius = 0 or not given
>  >
> 
> I have also tried:
>  > res <- project(cbind(x, y),  "+proj=aea +lon_0=24 +lat_0=0 +lat_1=-18 
> +lat_2=-32 +x_0=0 +y_0=0 ") #
> with the same error.
> 
> Any suggestions?
> 
> Thanks,
> 
> Sander.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no




More information about the R-help mailing list