importing a shapefile stored on a server
Dear all, I am just preparing a course on spatial analysis with R; The course is a rnw file. In the file, I want to import a shapefile within R. The shapefile is here : http://pbil.univ-lyon1.fr/R/donnees/francedep/ I have try :
library(maptools)
Le chargement a n?cessit? le package : foreign Le chargement a n?cessit? le package : sp
library(shapefiles)
Attachement du package : 'shapefiles'
The following object(s) are masked from package:foreign :
read.dbf
The following object(s) are masked from package:foreign :
write.dbf
read.shapefile("http://pbil.univ-lyon1.fr/R/donnees/francedep/dep_france_dom")Erreur dans get("read.dbf", "package:foreign")(dbf.name) :
impossible d'ouvrir le fichier DBF
read.shape("http://pbil.univ-lyon1.fr/R/donnees/francedep/dep_france_dom.shp")Erreur dans getinfo.shape(filen) : No such file
readShapePoly("http://pbil.univ-lyon1.fr/R/donnees/francedep/dep_france_dom")
Erreur dans getinfo.shape(filen) : No such file Is there a way to read directly this file ? One solution would be to use download.file and then read the shapefile but I wonder if it would be possible to read directly the data from the url. Cheers.
St?phane DRAY (dray at biomserv.univ-lyon1.fr ) Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - Lyon I 43, Bd du 11 Novembre 1918, 69622 Villeurbanne Cedex, France Tel: 33 4 72 43 27 57 Fax: 33 4 72 43 13 88 http://biomserv.univ-lyon1.fr/~dray/