[R] map of a country and its different geographical levels

CE.KA ce.kaya75 at yahoo.fr
Sat Nov 7 11:33:12 CET 2009


Hi Greg
 
I downloaded the file "france.shapefiles.zip"
Then i unziped it.
There were 4 files interesting me:
- france_administrative.dbf
- france_administrative.prj
- france_administrative.shp
- france_administrative.shx
How can i do to read the map "france_administrative" with R
 
I tried this script that i found on a french web site:
library(maptools) 

library(rgdal) 

library(foreign)
proj.string <- "+init=epsg:27572 +proj=lcc +lat_1=45.90287723937 

+lat_2=47.69712276063 +lat_0=46.8 +lon_0=2.337229104484 

+x_0=600000 +y_0=2200000 +units=m +pm=greenwich"
proj.string.geo <- "+proj=longlat +datum=WGS84"
france <- readShapePoly("france_administrative.shp",
proj4string=CRS(proj.string))
france <- spTransform(france, CRS(proj.string.geo))
save(france, file="france.rda")
 
But there was an error message:
Error in .asSpatialPolygonsShapes(Map$Shapes, IDs, proj4string =
proj4string,  :
Not polygon shapes 

Best regards
-- 
View this message in context: http://old.nabble.com/map-of-a-country-and-its-different-geographical-levels-tp26225645p26240900.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list