1

ASCII to RASTER fails with comma syntax error, but data appears correctly formatted with no commas

I'm trying to use the ASCII to RASTER tool (ArcMap V10.4.1) on PRISM rainfall data. The file appears to have the correct format for this use:

ncols 1405

nrows 621

xllcorner -125.020833333333

yllcorner 24.062500000000

cellsize .04166666666667

NODATA_value -9999

-9999.00 -9999.00 -9999.00 -9999.00 -9999.00 -9999.00 -9999.00 -9999.00 -9999.00 

... and so on...

However, I get the following error messages:

ERROR 010328: Syntax error at or near symbol ,.

ERROR 010267: Syntax error in parsing grid expression.

Failed to execute (ASCIIToRASTER).

There are no commas in this entire file. So I'm at a loss for what this error refers to.

Full PRISM asc files can be downloaded here: http://www.prism.oregonstate.edu/recent/

  • Welcome to GIS SE! As a new user please take the tour to learn about our focused Q&A format. Is that your entire error message? If not can you please edit the question to include the entire message? – Midavalo Jun 2 '17 at 17:24
  • 2
    I would guess that the syntax error refers to your command or code, not to data. – user30184 Jun 2 '17 at 20:36
  • @user30184 I am not using a script. Instead, I searched for the "ASCII to Raster" tool in the search bar and used the GUI box that popped up. Since it only has 3 inputs (Input and Output file names, and a drop down menu to pick between Float and Integer), I'm not sure how a comma could have entered into it. My input file name doesn't have a comma in it, and I leave the output file name as the default. Also, I'm attempting to use integer, but a conversion to float fails with the same error. – Megan Mallard Jun 5 '17 at 11:40
  • Instead of using the GUI interface, I pulled up a python window and tried the conversion. After moving both files to my desktop, that worked. I think it must have been some part of the directory structure in the my documents folder that it didn't like (still not sure where the troublesome comma came in). – Megan Mallard Jun 5 '17 at 13:10
  • I have been trying to figure this out for hours. Turns out saving it to my desktop rather than my documents solved the problem. Thanks Megan Mallard! – Laura S Aug 5 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.