DESCRIPTION

r3.what queries 3D raster at specified coordinates. The input parameter is a valid 3D raster map in the current mapset search path. The output parameter is used to output results in a text file. If output is not specified or '-' is used, then standard output (stdout) is used.

Coordinates can be specified directly using options coordinates as coordinate pairs (east, north), or using option coordinates_3d as east, north and top. If the coordinates are 2D, the result will be a list of values representing the vertical column of the 3D raster at that coordinates (from bottom to top). If 3D coordinates are provided only one value is returned. User can specify multiple coordinates.

Another option is to specify vector points map using option points. It can be either 2D or 3D. If a 3D vector points map is specified, one 3D raster value per point is printed. If that is not desired, flag z will ignore the z coordinate and the module returns values for the vertical column.

Example

We create a 3D raster where values depend on the depth. We query the 3D raster with two 2D coordinates:
g.region s=0 n=100 w=0 e=100 b=0 t=100 res3=1 res=1 tbres=10 -p3
r3.mapcalc "new = depth()"
r3.what input=new@user1 coordinates=10,20,50,50
10.000000|20.000000|1.000000|2.000000|3.000000|4.000000|5.000000|6.000000|7.000000|8.000000|9.000000|10.000000
50.000000|50.000000|1.000000|2.000000|3.000000|4.000000|5.000000|6.000000|7.000000|8.000000|9.000000|10.000000
Here we query the 3D raster with two 3D coordinates:
r3.what input=new@user1 coordinates_3d=10,10,1,10,10,11
10.000000|10.000000|1.000000|1.000000
10.000000|10.000000|11.000000|2.000000

SEE ALSO

r.what, r3.out.ascii, v.what.rast3, g.region

AUTHORS

Anna Petrasova, NCSU GeoForAll Lab

Last changed: $Date$