globalmapper.GenerateRoughnessGrid(GM_LayerHandle_t32 aLandCoverLayer, GM_RoughnessGridParams_t aGridParms, int aReserved) GM_Error_t32, GM_LayerHandle_t32[source]

Generates a roughness length grid from the provided raster land cover layer. The returned layer handle must be closed with 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.

  • aLandCoverLayer (GM_LayerHandle_t32) – Raster land-use Layer to generate roughness from

  • aGridParms (GM_RoughnessGridParams_t) – Parameters for generating roughness grid

  • aReserved (int) – Reserved for future use; must be 0.


Error Code

Return type



Created roughness grid layer

Return type