Note

Need help? Please let us know in the UMEP Community.

6. UMEP for Processing

UMEP for Processing ports the UMEP tools to the QGIS processing framework, which is a geoprocessing environment that can be used to call native and third-party algorithms from QGIS, making your spatial analysis tasks more productive and easy to accomplish. You can for example call the UMEP tools directly as functions in a Python script or include them in the Graphical Modeler in QIS.

UMEP for processing is available from Plugins -> Manage and Install Plugins… in the menu bar in QGIS. More tools, info and tutorials is under contruction. The code is available via our Github page.

6.1. Accessing algorithms in a stand-alone Python script

By make use of processing for UMEP there are possibilities to export UMEP-tools to a standalone Python script. One easy way to do this is to run a certaion tool from the Processing Toolbox and copy the syntax from the log-tab or from the History log in the QGIS Processing toolbox.

Below you see a commmand example running the Wall Height and Aspect-tool copied from the History log after running the tool through the toolbox:

processing.run("umep:Urban Geometry: Wall Height and Aspect",
   {'INPUT':'C:/temp/DSM.tif',
   'ASPECT_BOOL':True,
   'INPUT_LIMIT':3,
   'OUTPUT_HEIGHT':'C:/temp/height.tif',
   'OUTPUT_ASPECT':'C:/temp/aspect.tif'})

To access third party processing plugins (such as UMEP) in a stand-alone Python script, use the following lines of code (example for Windows users):

from qgis.core import QgsApplication
import sys

# Initiating a QGIS application
qgishome = 'C:/OSGeo4W/apps/qgis/'
QgsApplication.setPrefixPath(qgishome, True)
app = QgsApplication([], False)
app.initQgis()

# import third party processing plugins
sys.path.append(r'C:\Users\ **your_username** \AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins')
from processing_umep.processing_umep_provider import ProcessingUMEPProvider
umep_provider = ProcessingUMEPProvider()
QgsApplication.processingRegistry().addProvider(umep_provider)

from processing.core.Processing import Processing
Processing.initialize()

6.2. Road map for UMEP for Processing

Below you can see which tools that have been migrated to UMEP fro processing and what tools that will not be migrated. Please report any issues to our repository.

MetdataProcessor Will not be migrated
ShadowGenerator READY
SkyViewFactorCalculator READY
ImageMorphParam READY
ImageMorphParmsPoint READY
LandCoverFractionGrid READY
LandCoverFractionPoint READY
LandCoverReclassifier Will not be migrated (Use any other built-in reclassifier in QGIS)
WallHeight READY
TreeGenerator READY
FootprintModel NOT READY
LCZ_converter NOT READY
WallHeight READY
UMEP_Data_Download NOT READY
DSMGenerator READY
GreaterQF NOT READY
ERA5 DownloadData READY
TreePlanter READY (only available via UMEP for processing)
ExtremeFinder NOT READY
LQF NOT READY
SEBE READY
SuewsSimple Will not be migrated
SUEWSPrepare NOT READY
SUEWSConverter Will not be migrated
SUEWS READY
SOLWEIG READY
BenchMarking Will not be migrated
SEBEVisual Will not be migrated
SolweigAnalyzer READY (only spatial section migrated)
SUEWSAnalyzer READY (only spatial section migrated)
UWGReclassifier Will not be migrated
UWGPrepare READY
Urban Weather Generator READY (only available via UMEP for processing)
UWGAnalyzer READY (only available via UMEP for processing)
SpatialTC READY (only available via UMEP for processing)
URock READY (only available via UMEP for processing)