Map and Table Calculation

TBLVALUE( ) function

Returns the value (value, class name, id or string) from table Table as found in column "ColumnName" and in record Record.  

Syntax

TBLVALUE(Table, "ColumnName", Record)

Input

Table is a table name
ColumnName is a column name
Record is a record number, a class name or an ID

Output

TBLRECS returns: a value
Domain: system domain Value

Notes:

Tips:

Usable in

MapCalc, TabCalc, Simple calculators

Examples

Pocket line calculator examples:

? TBLVALUE(Cityblocks,"Area","015")

returns the value from table Cityblock (ID domain) as found in column Area and in record 015 

? TBLVALUE(Tmb1.his,"Npix",65)

returns the number of pixels with value 65 in map Tmb1 as found in column Npix and in record 65 of histogram Tmb1

? TBLVALUE("C:\Path\Tmb1.his","Npix",65)

returns the same as above but with the histogram in another directory

TabCalc example:

OutCol = TBLVALUE(InTable, "InCol", 5)

 

InTable

InCol

OutCol

10

15

35

15

20

15

35

15

15

15

40

15

?

15

40

15

30

15

MapCalc example:

OutMap = InMap - TBLVALUE(InTable, "InCol", 5)

 

InMap

OutMap

10 35 20
35 15 40
? 40 30
-5 20 5
20 0 25
? 25 15

See also:

MAPMAX PIXSIZE
MAPMIN PIXAREA
MAPROWS TBLRECS
MAPCOLS TBLCOLS