Solution to: [Beginner question] Raster to ASCII conversion

Becky Kern kern.ra at
Mon Nov 15 21:14:56 CET 2010

Hi users,

Found a solution to my Raster to ASCII conversion problem, so I thought I'd

My raster was created in ArcGIS 9.3 as an ESRI GRID (folder with associated
info folder). I needed to use the ListRasters method (see
get Python to recognize it as a raster. My functioning code is posted below.

>>import arcgisscripting
>>gp = arcgisscripting.create(9.3)
>>gp.workspace = "C:\Users\Lab User\Desktop\BKern\Blackwater\PVA\Scenario
1\Nov 15"
>>rasters = gp.ListRasters("","ALL")
>>for raster in rasters: print raster
>>InRaster = "scen1_11_15"
>>OutasciiFile = "C:\Users\Lab User\Desktop\BKern\Blackwater\PVA\Scenario
1\Nov 15\scen1.asc"
>>gp.RasterToASCII_conversion(InRaster, OutasciiFile)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list