[R-sig-Geo] quick projection question

Roger Bivand Roger.Bivand at nhh.no
Fri Jan 22 15:40:24 CET 2010


On Thu, 21 Jan 2010, Julie Lee-Yaw wrote:

> Hi,
>
> I am trying to reproject a shapefile in R. The current projection that I 
> am using is a lambert equal area projection defined by the proj4string:
>
> +proj=laea +lat_0=90 +lon_0=-100 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 
> +units=m +no_defs
>
> I've since decided that it would be better for my calculations (areas of 
> polygons in Canada) if the projection was centred at 60 degrees latitude 
> instead of at the north pole. To reproject the shapefile using rgdal, is 
> it simply sufficient to enter the following proj4string as an argument 
> (e.g. just change the value of +lat_0)?
>
> e.g.
> spProj=spTransform(file,CRS("+proj=laea +lat_0=60 +lon_0=-100 +x_0=0 
> +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"))
>
> is this the proper way to chance the latitude of origin? or am I missing 
> a step that is needed to create a custom CRS?

This looks OK, please try it and see, perhaps by seeing if a further 
transformation to longlat and export to KML, maybe for a chosen subset of 
polygons if there are many. Viewing in GE would then show if the transfom 
from your custom CRS transfomed further to geographical coordinates ends 
up in the "right" place.

Roger

>
> Thanks!
>
> Julie
>
>
>
>
>
>      __________________________________________________________________
> [[elided Yahoo spam]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

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



More information about the R-sig-Geo mailing list