<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"><DIV>Barry,</DIV> <DIV> </DIV> <DIV>Took your advice and wrote my own function to deal with the individual files.  Took more than four lines, but that is likely a reflection on my ugly code!  It does work on my own machine/internal browser.  </DIV> <DIV> </DIV> <DIV>Now with local copies I can just use readOGR as intended.</DIV> <DIV> </DIV> <DIV>Thanks again for the adivce Michael and Barry!</DIV> <DIV> </DIV> <DIV>Cheers,</DIV> <DIV>jeff</DIV> <DIV> </DIV> <DIV>download.shapefile<-function(shape_url,dsn,outfile=dsn)<BR>{<BR>   #written by: jw hollister<BR>   #Oct 10, 2012<BR>   <BR>   #set-up/clean-up variables<BR>   if(length(grep("/$",shape_url))==0)<BR>   {<BR>      shape_url<-paste(shape_url,"/",sep="")<BR>   }<BR>   #creates vector of all possible shapefile extensions<BR>   shapefile_ext<-c(".shp",".shx",".dbf",".prj",".sbn",".sbx",".shp.xml",".fbn",<BR>                    ".fbx",".ain",".aih",".ixs",".mxs",".atx",".cpg")</DIV> <DIV>   #Check which shapefile files exist<BR>   if(require(RCurl))<BR>   {<BR>      xurl<-getURL(shape_url)<BR>      xlogic<-NULL<BR>      for(i in paste(dsn,shapefile_ext,sep=""))<BR>      {<BR>         xlogic<-c(xlogic,grepl(i,xurl))<BR>      }<BR>      #Set-up list of shapefiles to download<BR>      shapefiles<-paste(shape_url,dsn,shapefile_ext,sep="")[xlogic]<BR>      #Set-up output file names<BR>      outfiles<-paste(outfile,shapefile_ext,sep="")[xlogic]<BR>   }</DIV> <DIV>   #Download all shapefiles<BR>   for(i in 1:length(shapefiles))<BR>   {<BR>      download.file(shapefiles[i],outfiles[i],method="auto",mode="wb")<BR>   }<BR>}</DIV> <DIV> </DIV> <DIV><BR><BR><BR>***************************<BR>Dr. Jeffrey W. Hollister<BR>Research Ecologist<BR>US EPA<BR>Atlantic Ecology Division<BR>27 Tarzwell Drive<BR>Narragansett, RI 02882<BR>(401) 782-9655<BR>***************************</DIV><BR><BR><FONT color=#990099>-----Michael Sumner <mdsumner@gmail.com> wrote: -----</FONT>  <DIV style="PADDING-LEFT: 5px"> <DIV style="BORDER-LEFT: black 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">To: Barry Rowlingson <b.rowlingson@lancaster.ac.uk><BR>From: Michael Sumner <mdsumner@gmail.com><BR>Date: 10/09/2012 05:37PM<BR>Cc: Jeff Hollister/NAR/USEPA/US@EPA, "r-sig-geo@r-project.org" <r-sig-geo@r-project.org><BR>Subject: Re: [R-sig-Geo] Reading a Shapefile from a website with readOGR?<BR><BR> <DIV><FONT size=2 face="Default Monospace,Courier New,Courier,monospace">Heh, good point!  There are so many options some times . . .<BR><BR>On Wed, Oct 10, 2012 at 8:23 AM, Barry Rowlingson<BR><b.rowlingson@lancaster.ac.uk> wrote:<BR>> On Tue, Oct 9, 2012 at 9:49 PM, Michael Sumner <mdsumner@gmail.com> wrote:<BR>>> This can work with a combination of vsizip (or other) and vsicurl, but the<BR>>> multiple files will have to be in an archive (zip or other).<BR>>><BR>>> <A href="http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip">http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip</A><BR>>><BR>>> See examples near the bottom of the page for OGR. Keep the zip file name<BR>>> the same as the shapefile/layer name and don't have subdirectories for the<BR>>> simplest case.<BR>>><BR>>> I am pretty sure this cannot work otherwise for a multifile format.<BR>><BR>>  Neat, but I suspect in practice the underlying code is just<BR>> downloading the zip and extracting to a temp file, which is about four<BR>> lines of R code. If the shapefile components aren't zipped up, its<BR>> just as easy.<BR>><BR>>  I'd write a wrapper to do that.<BR>><BR>> Barry<BR><BR><BR><BR>-- <BR>Michael Sumner<BR>Hobart, Australia<BR>e-mail: mdsumner@gmail.com<BR></FONT></DIV></DIV></DIV> <DIV></DIV></font>