Map and Table Calculation

RASVALUE( ) function

Returns the value of a raster map at a certain row, column position.

Syntax

RASVALUE(RasterMap, RowNumber, ColumnNumber)

Input

RasterMap is a raster map
RowNumber is a row number
ColumnNumber is a column number

Output

RASVALUE returns: a class name, an ID or a value
Domain: same as RasterMap

Tips:

Usable in

Simple calculators, MapCalc, TabCalc

Examples

Pocket line calculator examples:

? RASVALUE(Tmb1,100,200)

returns the pixel value of the pixel on line 100 and column 200, e.g. 45

? RASVALUE(Geology,62,191)

returns the pixel value of the pixel on line 62 and column 191, e.g. Gl : Glacial deposits

MapCalc example:

The next example describes the assignment of average values to pixels of an image in which whole lines are missing. Occasionally satellite images suffer from so called back drop lines. In this example every 8th line is missing. These lines are assigned values which are the average values from the line above and the line below.

OutImage = IFF((%L MOD 8=0), (RASVALUE(Image, %L-1, %C) + RASVALUE(Image, %L+1, %C))/2, Image)

Image

OutImage

Line 7

 

 

Line 8

 

 

Line 9
51 6 29
? ? ?
8 18 53
51.00 6.00 29.00
29.50 12.00 41.00
8.00 18.00 53.00

Image shows some pixels of line 7 up to line 9 while line 8 is missing. These missing values are replaced by the average values of the pixels of the line above and the line below.

Note:

In this example both maps use system domain Value.

See also:

COORD MINCRDX MAPCRD DIST
CRDX MINCRDY MAPROW DIST2
CRDY MAXCRDX MAPCOL
TRANSFORM MAXCRDY MAPVALUE