[R-sig-Geo] from ArcGIS GRID to .ASC

Alexander Brenning brenning at uwaterloo.ca
Sat Sep 20 03:12:09 CEST 2008


an alternative to using GDAL for writing ASCII grids is the 
write.ascii.grid function in the RSAGA package. (RSAGA is an interface 
to SAGA GIS, but this function actually doesn't require SAGA to be 
installed on your computer.)

write.ascii.grid(data, file, header = NULL, write.header = TRUE,
     digits, dec = ".", georef = "corner")

The 'data' argument is a matrix, and the 'header' is a list with named 
components as in the ASCII grid header, see RSAGA help. Defining your 
own header is pretty simple.

I hope this helps

milton ruser wrote:
> Dear all,
> I am reading a set of maps from ArcGRID format using rgdal and I need to
> export to ASC format.
> But when I try the commands below, I get an error.
> require(rgdal)
> mes01jan<-readGDAL("jan_00")
> image(mes01jan, col=topo.colors(50))  #looks find
> writeGDAL(mes01jan, "mes01jan.asc", drivername = "AAIGrid", type="Byte")
> Any idea?
> miltinho, brazil
> 	[[alternative HTML version deleted]]
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Alexander Brenning
brenning at uwaterloo.ca - T +1-519-888-4567 ext 35783
Department of Geography and Environmental Management
University of Waterloo
200 University Ave. W - Waterloo, ON - Canada N2L 3G1

More information about the R-sig-Geo mailing list