Select to view content in your preferred language

Converting ASCII to Raster using arcpy (LINUX)

356
0
03-02-2011 07:25 AM
NeilRoberts
New Contributor
Hello

I am having trouble batch converting some ESRI ASCII files to Raster using arcpy on a LINUX server.

The arcpy code I am running is below, where I have predefined the variables as follows:


  • ASCII_to_RASTER_infile = "/home/array.txt"

  • ASCII_to_RASTER_outfile = "/home/raster"



import arcpy
arcpy.ASCIIToRaster_conversion(ASCII_to_RASTER_infile, ASCII_to_RASTER_outfile, "FLOAT")


I am getting the following errors:

ERROR 010158: Unable to open file /HOME/ARRAY.TXT.
ERROR 010067: Error in executing grid expression.
Failed to execute (ASCIIToRaster).

I have checked the headers in my ESRI ASCII file which look correct. I have also successfully converted this ESRI ASCII file to raster in ArcMap.

Could this be a problem with directory paths in Linux (being different for windows) and if so is there a way around this?

Thanks
0 Kudos
0 Replies