ASCII to Raster doesn't work

1014
3
02-10-2023 03:51 AM
mirko_barada
New Contributor II

Hi,

I am struggling to convert (modified) ASCII files to rasters (examples attached, zipped + image of error message). Original ASCII files (which I don't have) were delimited using Excel after which they are tab delimitted, as attached. Now it looks like ArcGIS can't convert them back to rasters.

In ArcMap I am using ASCII to raster tool.

In ArcPro I use Copy Raster.

 

Even when I replace tabs for spaces (1 space) in these ascii files, the result is the same.

Also, folder naming, output file extension, everything should be fine, since I followed the advices about ascii data.

Thanks in Advance

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

It is you path to the files that is throwing an error.  Since your path isn't raw encoded something is amiss.  Spaces in the path are not good and any folder beginning with a \t \a and a bunch of others will cause failure.

Try copying the asc files into a simple folder like r"c:\Data"  and the output rasters should be to a folder and have a *.tif extension.  Tiff files are the recommended raster format for use in Pro


... sort of retired...
mirko_barada
New Contributor II

Hi,

thanks, but it's not working actually. Video attached, I did what you suggested.

It has something to do with the modified ascii file structure, because when I convert some random raster to ascii, by using the same tool, and then perform opposite process (ascii to raster) over the same ascii file, then it works. And both the path and file name are default \Documents\ArcGIS\Default1.gdb\ASCIITo_txt18.

 

However, with my modified ascii files it simply doesn't work as you can see.

0 Kudos
mirko_barada
New Contributor II

My apologies , it is solved now.

 

Many thanks, really wasn't aware of this. So in the end, it doesn't matter if I changed spaces to tabs within ascii file.

 

Best

Mirko

0 Kudos