Hello, 
I’m trying to use the map function from package maps to draw the contiguous 
United States with the projection, "+proj=aea +lat_1=29.5 +lat_2=45.5 
+lat_0=39.8 +lon_0=-98.6 +x_0=0 +y_0=0 +datum=WGS84 +units=km +no_defs". 
Below is my code I have written, but I don't know what to put for X. The maps 
documentation says, "the default is to use a rectangular projection with the 
aspect ratio chosen so that longitude and latitude scales are equivalent at the 
center of the picture." I can't figure out how to specify this in terms of a 
CRS string for X. 
us = map("state", plot=FALSE, fill=TRUE, col="transparent") 
us_sp = map2SpatialPolygons(us, IDs=us$names, proj4string = CRS(X) ) #don't 
know what to put for X 
proj.string.alb = CRS("+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=39.8 
+lon_0=-98.6 +x_0=0 +y_0=0 +datum=WGS84 +units=km +no_defs") 
us_sp = spTransform(us_sp, CRS=proj.string.alb) 
plot(us_sp) 
Thanks for your help!


_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to