[R-sig-Geo] e00 to SpatialPolygons: how to set the correct projection

Hans-Jörg Bibiko bibiko at eva.mpg.de
Mon Jan 26 12:53:32 CET 2009


On 26.01.2009, at 12:06, Paul Hiemstra wrote:
> Please checkout the spTransform() command which allows you to  
> reproject your sp objects (it is located in the rgdal package).


On 26.01.2009, at 12:06, Roger Bivand wrote:
> No. Your data are in a Lambert projection, probably lcc, but  
> possibly laea, with the +lat_*= and +lon_0= arguments given. If 110  
> is 110E, you are somewhere in Asia, but knowing how muddled things  
> get, it may be 110W, so -110, and North or Central America. If you  
> have access to rgdal, try reading the Arc binary vector data  
> directly, the driver may pick up the projection automatically.



Thanks a lot for both hints! I got it ;)

I did this:

 > e00proj <- CRS(proj4string(readOGR(e00File, "ARC")))
 > e00proj
CRS arguments:
  +proj=lcc +lat_1=25 +lat_2=47 +lat_0=10 +lon_0=110 +x_0=0 +y_0=0  
+ellps=clrk66 +units=m +no_defs

 > NMG <- pal2SpatialPolygons(arcs, pal, IDs=IDs, proj4string = e00proj)
 > NMG <- spTransform(NMG, CRS("+proj=longlat +ellps=WGS84  
+datum=WGS84 +no_defs +towgs84=0,0,0"))


--Hans

**********************************************************
Hans-Joerg Bibiko
Max Planck Institute for Evolutionary Anthropology
Department of Linguistics
Deutscher Platz 6     phone:   +49 (0) 341 3550 341
D-04103 Leipzig       fax:     +49 (0) 341 3550 333
Germany               e-mail:  bibiko at eva.mpg.de




More information about the R-sig-Geo mailing list