Created
April 22, 2021 10:06
-
-
Save Gustry/fc13d4c032c14a53bfe2d96709911437 to your computer and use it in GitHub Desktop.
Debug vector layer within Processing algo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@staticmethod | |
def debug_layer(context, layer: QgsMapLayer, name=None): | |
from qgis.core import QgsProcessingContext | |
if name: | |
layer.setName(name) | |
context.temporaryLayerStore().addMapLayer(layer) | |
context.addLayerToLoadOnCompletion( | |
layer.id(), | |
QgsProcessingContext.LayerDetails( | |
layer.name(), | |
context.project(), | |
"JENESAISPASCEQUECEST" | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment