globalmapper.GenerateRoughnessGrid ================================== .. currentmodule:: globalmapper .. py:function:: GenerateRoughnessGrid (GM_LayerHandle_t32 aLandCoverLayer, GM_RoughnessGridParams_t aGridParms, int aReserved) -> GM_Error_t32, GM_LayerHandle_t32 Generates a roughness length grid from the provided raster land cover layer. The returned layer handle must be closed with :doc:`CloseLayer<../load/globalmapper.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. :param GM_LayerHandle_t32 aLandCoverLayer: Raster land-use Layer to generate roughness from :param GM_RoughnessGridParams_t aGridParms: Parameters for generating roughness grid :param int aReserved: Reserved for future use; must be 0. :returns: Error Code :rtype: GM_Error_t32 :return: Created roughness grid layer :rtype: GM_LayerHandle_t32