Click or drag to resize

GM_GenerateRoughnessGrid

Generates a roughness length grid from the provided raster land cover layer. The layer handle returned in aGridLayer must be closed with GM_CloseLayer when you are done with it. It will be an "elevation" grid layer so any elevation related functions will work on it.

The roughness values are generated based on a provided table of land cover to roughness length values to use. There are several built-in roughness tables, but if you have provided a roughness_tables.txt file in your application folder then you can provide that roughness table. The first roughness table in that file will have an index of GM_Roughness_NumTypes with subsequent custom tables increasing by one.

See the definition of the GM_RoughnessGridParams_t type in the GlobalMapperInterface.h header file for a description of what options are available when generating the roughness grid. The default options are all a value of zero so you can just pass in a zero'd out structure to get the defaults if you want, although you should at least make sure to set the correct roughness table to use.

Syntax
GM_Error_t32 __stdcall GM_GenerateRoughnessGrid
(
GM_LayerHandle_t32              aLandCoverLayer,// IN: Raster land-use Layer to generate roughness from
const GM_RoughnessGridParams_t* aGridParms,     // IN: Parameters for generating roughness grid
GM_LayerHandle_t32*             aGridLayer,     // OUT: Created roughness grid layer
void*                           aReserved       // IN: Reserved for later use, must be NULL
);