# MAPCOL( ) function

Returns the column number of a pixel in raster map RasterMap at a certain (X,Y) Coordinate.

Syntax

MAPCOL(RasterMap, Coordinate)

Input

 RasterMap is a raster map Coordinate is an (X,Y) coordinate Domain type: a coordinate system

Output

 MAPCOL returns: a value Domain: system domain Value

Notes:

• Depending on the georeference of the raster map, the column number of an XY coordinate is returned
• The coordinate system of Coordinate is automatically transformed to the coordinate system of RasterMap if Coordinate and RasterMap do not have the same coordinate system.

Tips:

• This function may be handy to use in DDE applications.
• When the definition symbol = is used, a dependent output map or dependent output column is created; when the assignment symbol := is used, the dependency link is immediately broken after the output map/column has been calculated.

Usable in

Examples

Pocket line calculator examples:

 ? MAPCOL(Landuse,COORD(803429, 8074631)) returns the column number of the pixel in raster map Landuse at coordinate (803429, 8074631), e.g. 398

TabCalc example:

OutCol1 = MAPCOL(Landuse,Coordinate)

OutCol2 = MAPCOL(Tmb1,Coordinate)

 Rainfall.mpp opened as table Working table ID Name Coordinate OutCol1 Outcol2 1 UMSS (803429.00, 8074631.00) 398 255 2 Taquina (799748.00, 8082415.00) 214 82 3 Laguna Santa Rosa (803511.00, 8087422.00) 402 167 4 Laguna Totura (801281.00, 8088967.00) 291 85 5 PROMIC (802613.00, 8080483.00) 357 187 6 Aro Caqua (806816.00, 8076585.00) 567 ? 7 Colca Pithua (797465.00, 8078352.00) 100 37 8 Cerro MachaMach (796346.00, 8087736.00) 44 ? 9 Laguna WaraWara (806042.00, 8085414.00) 529 263

Note:

As raster map Landuse uses a different georeference than raster map Tmb1, the values in output columns OutCol1 and OutCol2 are not the same.