[R-sig-Geo] Projection of a shapefile
Roger.Bivand at nhh.no
Tue Mar 6 14:24:25 CET 2012
On Tue, 6 Mar 2012, Ester Polaina Lacambra wrote:
> Hello everyone,
> This is going to sound quite silly, but I'm an amateur R user and after a
> while I haven't been able to find the solution for my problem...
> I've got a shapefile coming from ArcMap 10, with a Projected Coordinate
> System: World_Cylindrical_Equal_Area (I chose that one when I was measuring
> areas); and a Geographic Coordinate System: GCS_WGS_1984.
> I read it with R by using:
> WCountries <- readShapePoly("myfile",ID="COUNTRY")
readShapeSpatial() in maptools cannot read any projection information - it
uses shapelib, which ignores projections. Use the readOGR() function in
rgdal instead. Do not be surprised if the Arc description is not matched,
it is not a gold standard; an EPSG code has at least as good authority.
The coordinates you see are what you asked Arc to export, they are in the
coordinate reference system you specified.
> When I use the expresion "coordinates(WCountries)" some apparently UTM
> coordinates appear. How do I know how R has calculated this? because
> it keeps saying:
> Is projected: NA
> proj4string : [NA]
> Thank you very much!!
Department of Economics, NHH Norwegian School of Economics,
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