WorldToIndexRounded

Declaration: TMetaData.WorldToIndexRounded(dim: TDims; coord: double; grp: integer): integer;
Converts the world coordinate coord along the dimension specified by the parameter dim to the corresponding cell index. For layers (dim = dimL) the grp parameter has to contain the spectral group number, for all other dimensions it is ignored. The returned value is rounded to the closest index number.

Hint: In order to directly access the metadata of the currently loaded dataset you can use the pre-declared global variable MData.