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

Michael Sumner mdsumner at utas.edu.au
Sat Sep 20 02:46:26 CEST 2008


I tried this, and AAIGrid is not available for creation by rgdal on my 
machine. See gdalDrivers() for those available.

If you install FWTools you can use a workaround to convert the export 
externally, e.g.

 x <- readGDAL(system.file("external/test.ag", package="sp")[1])

## write to GeoTIFF
 writeGDAL(x, "mes01jan.tif",  type = "Byte")

## convert externally to AAIGrid
system("gdal_translate mes01jan.tif mes01jan.asc -of AAIGrid -ot Byte")

## check result
system("gdalinfo mes01jan.asc")

I don't believe that AAIGrid can explicitly support type Byte without 
augmentation, so I would carefully check the coercion that occurs (if 
it's actually needed).

Cheers, Mike.

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
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.169 / Virus Database: 270.7.0/1681 - Release Date: 9/19/2008 3:54 PM
>
>




More information about the R-sig-Geo mailing list