[R-sig-Geo] Closing readOGR handles

Alexander Shenkin ashenkin at ufl.edu
Fri Mar 30 18:12:06 CEST 2012


Hmm, I restarted R, and can't reproduce the issue.  I'll post back if
and when it happens again and I can narrow it down.

I'm on Win 7 Pro x64, running R 2.14.2 and RStudio 0.95.263.  I saw the
open filehandles by doing a search in Process Explorer.

> packageDescription("rgdal")
Package: rgdal
Title: Bindings for the Geospatial Data Abstraction Library
Version: 0.7-8
Date: 2012-01-18

thanks,
allie

On 3/30/2012 9:42 AM, Barry Rowlingson wrote:
> On Fri, Mar 30, 2012 at 3:15 PM, Alexander Shenkin <ashenkin at ufl.edu> wrote:
>> Hi folks,
>>
>> I'm opening some ESRI shapefiles with readOGR.  R seems to keep open
>> file handles on the files opened.  Is there any way to close those
>> handles without quitting R?  I don't see a read-only option on readOGR,
>> nor do I see any close methods.  I've tried GDAL.close(x), but I get
>> errors saying there's no "handle" slot.
> 
>  I don't see that happening. What OS are you on? How are you detecting
> open file handles?
> 
>  On my Linux box if I use "lsof" before and after reading a shapefile
> (with readOGR) I don't see any new file handles left open.
> 
>  If I open a file connection with "file" and "open" I do see a new
> file handle, so if readOGR was leaving it open then I think I would
> see it.
> 
>> packageDescription("rgdal")
> Package: rgdal
> Title: Bindings for the Geospatial Data Abstraction Library
> Version: 0.7-5
> Date: 2011-11-16
> 
>  would be useful...
> 
> Barry



More information about the R-sig-Geo mailing list