I have this .asc file of maximum temperature of a local place. This file is a result of vector to raster (GeoTIFF) conversion then GeoTIFF to ASCII grid conversion, both using QGIS. Here is a snippet of the actual file when loaded into WordPad:
ncols 3000
nrows 3000
xllcorner 122.612907409668
yllcorner 9.038180351257
dx 0.000241035461
dy 0.000458419800
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
I need this file as an input for a niche modelling program (DesktopGARP
) and when I upload it in the DatasetManager it outputs an error:
> Error loading file contains an invalid ASCII Grid
I'm not sure where the problem is, however I found out that CELLSIZE is needed instead of DX and DY. The first 6 rows, instead, should look something like this:
ncols
nrows
xllcorner
yllcorner
cellsize
NODATA_value
I found a similar question Arc ASCII Grid output problem in QGIS 2.0 but the answer says to use FORCE_CELLSIZE=TRUE. But if I force the DX value into the CELLSIZE value, the raster image would shrink since the values of dx and dy are not nearly the same. Is there a way to manipulate the values without changing the raster's overall size?