I use GRASS 7.8.7 (2022).
For a DEM raster
r.fillnulls input=file1 output=file2
I get:
Registering primitives...
Using RST interpolation...
Locating and isolating NULL areas...
100%
Growing NULL areas
Assigning IDs to NULL areas
100%
Processing 1 map holes
Filling hole 1 of 1
ERROR: Invalid input <n=n+0>
ERROR: abandoned. Removing temporary maps, restoring user mask if needed:
I tried different tension values. Result is the same.
Bilinear method gives other error:
Using bilinear bspline interpolation
Patching fill data into NULL areas...
ERROR: Raster map <r_fillnulls_318_filled> not found
Traceback (most recent call last):
File "/usr/local/grass78/scripts/r.fillnulls", line 540, in <module>
main()
File "/usr/local/grass78/scripts/r.fillnulls", line 515, in main
output=output, overwrite=True)
File "/usr/local/grass78/etc/python/grass/script/core.py", line 441, in run_command
return handle_errors(returncode, returncode, args, kwargs)
File "/usr/local/grass78/etc/python/grass/script/core.py", line 343, in handle_errors
returncode=returncode)
grass.exceptions.CalledModuleError: Module run None r.patch --o input=rawdem,r_fillnulls_318_filled output=dem ended with error
Process ended with non-zero return code 1. See errors in the (error) output.
WARNING: No data base element files found
No idea about could it be
UPD: Result of g.region -p
projection: 3 (Latitude-Longitude)
zone: 0
datum: wgs84
ellipsoid: wgs84
north: 1N
south: 0
west: 0
east: 1E
nsres: 1
ewres: 1
rows: 1
cols: 1
cells: 1
Looks strange, but rawdem layer that is the source for the operation looks good.
UPD2:
I added g.region raster=rawdem
after it is imported to grass.
Now I get another error ERROR: Input map has no holes. Check region settings.
Now g.region -p is
projection: 3 (Latitude-Longitude)
zone: 0
datum: wgs84
ellipsoid: wgs84
north: 65N
south: 50N
west: 115E
east: 125E
nsres: 0:00:03
ewres: 0:00:03
rows: 18000
cols: 12000
cells: 216000000
The resulting raster still is not generated. Seems to be a bug in r.fillnulls code: if there is no holes - the result isn't generated. Maybe I could previously check if there are some NaN values?
g.region -p
.g.region -g
in my script? But where?ogr2ogr -f CSV -spat $EXTENT list.csv an_index.shp
writes tiles for extentgdalbuildvrt -input_file_list list.csv dem.vrt
builds a dem filer.external input=$DIR_PATH/dem.vrt output=rawdem
imports it Where should I set the region?