I am trying to load an ESRI ArcGrid export file into R. The file is located at- ftp://ftp.epa.gov/castnet/tdep/grids/n_tw/n_tw-2013.zip. The documentation for this file states, "Gridded data of the above variables are available in compressed ESRI ArcGRID export files" and not much else. Link to documentation here. My major problem is that this is an e00 file, an old output format of Arc.

The most straightforward way to load a raster normally (if this wasn't an e00 file) would be:

test <- raster('/path/to/n_tw-2013.e00')

However, you will receive the error: n_tw-2013.e00 not recognised as a supported file format..

The RArcInfo package claims to be able to convert .e00 files into more useful Arc/Info binary coverage. To do this:

#first argument is the path to the e00 file, and the second argument is the new directory to create

When I run this command it prints NULL, and creates two directories, test1, and info, however, both are empty. I'm not sure whats going wrong here.

How do I get this loaded into R as a raster so I can extract data to my specific lat/long?

Output of sessionInfo pasted here:

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS release 6.7 (Final)

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] rgdal_1.2-5  raster_2.5-8 sp_1.2-4    

loaded via a namespace (and not attached):
[1] tools_3.2.2     Rcpp_0.12.3     grid_3.2.2      lattice_0.20-33
  • 1
    It appears you are dealing with an Arc Exchange file - check this out How To: Import an ArcInfo interchange file (E00) in ArcGIS. Your trying to do this using R – whyzar Dec 24 '16 at 21:24
  • 1
    see RArchInfo package for reading.e00 files in r – Imran Ali Dec 24 '16 at 21:41
  • @ImranAli see updated question. The RArcInfo package still is not solving my problem for some reason. – user234105 Dec 24 '16 at 21:57
  • 1
    I can read it using raster(). Maybe update the packages. – Martin Schmelzer Dec 24 '16 at 22:25

I have no problem reading in the file using rgdal 1.2-3 and raster 2.5-8:

test <- raster('n_tw-2013.e00')
class       : RasterLayer 
dimensions  : 775, 1440, 1116000  (nrow, ncol, ncell)
resolution  : 4134.354, 4134.354  (x, y)
extent      : -2950369, 3003101, 115686.8, 3319811  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=aea +lat_1=0 +lat_2=29.5 +lat_0=45.5 +lon_0=0 +x_0=0 +y_0=-96 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
data source : /Users/Martin/Desktop/n_tw-2013.e00 
names       : n_tw.2013 
values      : 0.8068619, 70.83445  (min, max)

R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.12.2 (Sierra)

[1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] raster_2.5-8 sp_1.2-3    

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.7       plotly_4.5.2      magrittr_1.5      munsell_0.4.3     colorspace_1.2-7 
 [6] viridisLite_0.1.3 lattice_0.20-34   R6_2.2.0          httr_1.2.1        plyr_1.8.4       
[11] dplyr_0.5.0       tools_3.3.1       rgdal_1.2-3       grid_3.3.1        gtable_0.2.0     
[16] DBI_0.5-1         htmltools_0.3.5   lazyeval_0.2.0    assertthat_0.1    digest_0.6.10    
[21] tibble_1.2        purrr_0.2.2       ggplot2_2.2.0     tidyr_0.6.0       base64enc_0.1-3  
[26] htmlwidgets_0.8   scales_0.4.1      jsonlite_1.1   
  • strange, I just updated both raster and rgdal, but this still does not work for me... – user234105 Dec 24 '16 at 22:39
  • 1
    I added my sessionInfo. Maybe restart R so you have a clean environment. – Martin Schmelzer Dec 24 '16 at 22:47
  • Thanks for this. You prompted me to test this on my local machine where it did work with just the call to raster. No luck updating my packages or restarting R, but this definitely pushed me further. Will award the bounty as soon as I can. – user234105 Dec 24 '16 at 23:05
  • I am still interested in why it does not work. What OS are you using on the machine that does not like this snippet? – Martin Schmelzer Dec 24 '16 at 23:06
  • sessionInfo pasted into thread. – user234105 Dec 24 '16 at 23:10

It appears you are dealing with an ArcInfo Exchange file - check this out How To: Import an ArcInfo interchange file (E00) in ArcGIS. Your trying to do this using R.

If you wanted to use a command-line approach to unpack e00 you could use E00compr - A Library to Read/Write Compressed E00 Files with is open source.

Using the 'e00conv' Conversion Program

'e00conv' is a command-line executable that takes a E00 file as input (compressed or not) and copies it to a new file with the requested compression level (NONE, PARTIAL or FULL).

e00conv [NONE|PARTIAL|FULL] input_file is the name of the E00 file to read from. output_file is the name of the file to create. If the file already exists then it is overwritten.

The last argument is optional and specifies the compression level to use when creating the output file (one of NONE, PARTIAL or FULL). The default is NONE (uncompressed).

If you had access to ArcGIS

The steps in ArcGIS:

enter image description here

ArcGIS 10.x - All ArcGIS licenses

  1. Open ArcMap.
  2. Click the ArcToolbox icon. ArcToolbox icon for ArcGIS 10.x
  3. In ArcToolbox, expand Conversion Tools.
  4. Expand 'To Coverage'.
  5. Double-click 'Import from E00'.
  6. In the 'Input interchange file' (E00 file) entry box, click Browse. Navigate to the desired directory and select the file. Name the output dataset.

Note: File naming restrictions outlined at the beginning of this article still apply at ArcGIS 10.x.

  1. Click OK. A dialog window appears and indicates the process has completed. Click Close.
  2. Click 'Add Data' [O-Image] ArcMap Add Data button for Desktop 10.x and navigate to the selected directory.

First convert the file to provide a compatible format for R, then try to reload the raster in R.

  • Gotcha. I don't have ArcGIS. Any way to do this at the command line or within R would be super valuable. – user234105 Dec 24 '16 at 21:32
  • Possibly, I'll try to see what I can dig up. Do you have access to QGIS? – whyzar Dec 24 '16 at 21:34
  • I've updated my answer to provide you with an alternative command-line option to conver the e00 file. – whyzar Dec 24 '16 at 21:45
  • does it work with the file I have linked? Other approaches I have attempted to covert e00 files have returned empty directories. – user234105 Dec 24 '16 at 22:02

Use the function readGDAL from library(rgdal)

In your example should work:

n_tw_2013 <- readGDAL("path/to/the/file/n_tw-2013.e00")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.