ASCII to raster error in grid expression

942
4
03-14-2017 04:23 PM
Highlighted
New Contributor II

Hi, I've tried to find threads that others posted as helpful for this subject, but the seem to have been removed. 

I received and ASCII file from a colleague who produced it in Matlab. I asked them to follow the header for the ascii to raster tool (here: ASCII to Raster—Conversion toolbox | ArcGIS Desktop) and when I open the file in Notepad, the headings seem right (weird spacing, but I tried adding, subtracting spaces and get the same error). The error I receive is ERROR 010067: Error in grid expression

Since the headers seem correct (see screen shot) I'm not sure what the problem is. Any suggestions??

Reply
0 Kudos
4 Replies
Highlighted
MVP Esteemed Contributor

it is a wordwrap issue... notepad is known for it in my classes.  As long as they don't resave the file, I have had success with WordPad or Notepad++ if you have it installed.  The key is to ensure that the file is note resaved from Notepad.. ps... dont' use word either

PS the error message is probably directly related to the probable situation of you having spaces in your paths or if you are producing esri grid names exceed 10 (13?) characters in length

Reply
0 Kudos
Highlighted
New Contributor II

Dan, you are correct. It was a word wrap issue.


I exported an existing raster to ascii, copied the header, and used that format. Basically it needed to be a column with specific spacing rather than a line. Also, not sure why cell size was 0, but I changed it to what I thought it should be (1 m). Tool converted, however now I have a different problem with setting a spatial reference (trying to force bottom, left as decimal degress and top, right as numeric). 

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

I would go back to the original and find out it's metadata.  The coordinates are defined in Geographic Coordinates and the number of rows and columns are essentially indicating the number of fractional portions of a decimal degree you have 6247 rows so you have to figure what each cell represents in decimal degrees.  So your dem was probably called a '10m' or '30m' dem... these aren't the numbers you use for the cell size (ie 1 second = 2.7777...e-4 degrees *6247 cells = 1.735 degrees width from the lower left corner)

Reply
0 Kudos
Highlighted
New Contributor II

Thanks!

Reply
0 Kudos