Input data points do not need to have direct line of sight to each other. This is interpolation "as the fish swims", not "as the crow flies", and can see around headlands or across land-bridges without polluting over barriers which the natural value (or flightless bird) can not cross.
It was initially written to interpolate water chemistry in two parallel arms of a fjord, but may just as well be used for population abundance constrained by topography, or in studies of archeologic technology transfer.
Since generating cost maps can take a long time, it is recommended to keep the raster region relatively small and limit the number of starting points to less than 100.
Higher values of friction will help limit unconstrained boundary effects at the edges of your coverage, but will incur more of a stepped transition between sites.
The post_mask, if given, is applied after the interpolation is complete. A common use for that might be to only present data within a certain distance (thus confidence) of an actual sampling station. In that case the r.cost module can be used to create the mask.
This module writes lots of temporary files and so can be rather disk I/O
intensive. If you are running it many times in a big loop you may want to
set up a RAM-disk to put the mapset in (on UNIX symlinking back into the
location is ok), or adjust the disk-cache flushing timer to be slightly
longer than one iteration of the script.
To do this on Linux you can tune the
/proc/sys/vm/dirty_expire_centisecs kernel control. The default
is to keep files in memory a maximum of 30 seconds before writing them to
disk, although if you are short on free RAM the kernel may write to disk
long before that timeout is reached.
# set up a fake sea with islands: g.region n=276000 s=144500 w=122000 e=338500 res=500 r.mapcalc "pseudo_elev = elev_state_500m - 1100" r.colors pseudo_elev color=etopo2 r.mapcalc "navigable_mask = if(pseudo_elev < 0, 1, null())" # pick a data column from the points vector: v.info -c precip_30ynormals # run the interpolation: v.surf.icw input=precip_30ynormals column=annual output=annual_interp.3 \ cost_map=navigable_mask friction=3 --quiet # equalize colors to show maximum detail: r.colors -e annual_interp.3 color=bcyr # display results in an Xmonitor: d.erase black d.rast -o annual_interp.3 d.vect precip_30ynormals fcolor=red icon=basic/circle d.legend annual_interp.3 color=white at=48.4,94.8,3.4,6.0
Last changed: $Date$