I want to work with raster data in R, but I have problems exporting my raster dataset from ArcMap. By "export data"/GRID I get a file with an *.aux extension. What I need is *.grd.
Can anybody help me out?
|
|
The answer is do not export, because there is no need to. You can directly read Arc* grid data with the raster package (when library rgdal is availabled). And if you export, it is better to avoid ascii (use e.g. GTiff).
|
||||
|
|
EditA more convenient solution for reading is provided by @RobertH elsewhere in this thread. You can read the Arc* grid dataset directly using the same approach described here: simply reference the folder in which the grid datafiles lie in the Original replyIn Arc*, use the In
To create the .grd version, use
The console response will describe what's in the .grd part of the output (the data are in a .gri file), as in
|
|||||||||||
|
|
It doesn't appear that an ESRI GRID file has a single file with a .grd extension. Instead it seems to be a multi-folder/multi-file format that ArcMap sees as one file (akin to how shapefiles and ArcInfo coverages work). In any case the .aux file is a helper file to the GRID format that stores information that can't be stored in the raster itself. Here are some links that talks about it: About auxiliary files http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?TopicName=About_auxiliary_files When is an .aux file created? http://support.esri.com/en/knowledgebase/techarticles/detail/29821 |
|||||||||
|
|
convert your raster data to ascii and save in any of your directory. then n R library(rgdal) libray(sp) data<-readGDAL("C:/filepath/file") this will read your ascii grided file you can also chech your data by varioud commands such as summary(data) alernatively save your raster data as TIFF then using the same package (rgdal) it reads the tiff files you will read as data<-readGDAL("C:/filepath/file.tiff") |
|||
|
|