Closed jakubchr closed 5 years ago
Hello,
it looks like your ASC file has "dx" and "dy" fields in the header which are not currently supported by the ASCread() function.
GDAL does allow the creation of ASC files with "dx" and "dy" attributes for Golden Surfer software (https://www.gdal.org/frmt_various.html), but the standard ESRI grid ASC format does not support non-square pixels and only uses a "cellsize" attribute in the header to define the grid resolution: https://en.wikipedia.org/wiki/Esri_grid
An easy fix, since your pixels are practically square and your dataset covers a small extent, is to replace the following two lines in the header of your file (using a text editor):
dx 0.500043870159
dy 0.499967850811
By
cellsize 0.500043870159
I might add compatibility for Golden Surfer grids in the future.
Cheers Matt
Will try that. Thank you!
Jakub
Hello,
I am running Octave version 4.4.1 x86_64-w64-mingw32. I have a problem with reading ASC file. I get an error related to ASCRead.m
Here's my script:
My ASC file is zipped in the attachment. OCTAVE.zip
Thank you! Jakub