How to "Draw on Map Canvas" (as asked by Translate Raster Layer/Spatial Extent)?
One of the options in Translate Raster Layer/Spatial Extent is “Draw on Map Canvas”, but how?
Cannot find any drawing tool
Comments (5)
-
-
reporter But then, how do we use this Translate option? When we are prompted ““Draw on Map Canvas””, should we go to the QGIS Map Canvas and the polygon would be read from there? I do not mind, I understand duplicating the drawing tools is not necessary (and a pain for you, I bet). But in that case, perhaps the image should get automatically displayed in the QGIS Map Canvas and the message should be “Draw on QGIS Map Canvas”.
-
Unfortunately, this widget is not under my control. I can’t rename or reimplement those details.
-
This may become possible in future by changing the canvas object used in the QgsProcesisnParameterWidgetContext.
However, this requires modifications in the QGIS code. processingPlugin.executeAlgorithm(…) in plugins/processing/ProcessingPlugin.py and the AlgorithmDialog need some improvements to be able to acceppt none-standard QgsProcessingContext andQgsProcessingParameterWidgetContext
objects.see QGIS\src\gui\processing\qgsprocessingwidgetwrapperimpl.cpp
void QgsProcessingExtentWidgetWrapper::setWidgetContext( const QgsProcessingParameterWidgetContext &context ) { QgsAbstractProcessingParameterWidgetWrapper::setWidgetContext( context ); if ( mExtentWidget && context.mapCanvas() && type() != QgsProcessingGui::Modeler ) mExtentWidget->setMapCanvas( context.mapCanvas() ); }
-
reporter “This may become possible…”
What is “this”?
All I ask is to clarify to the user what to do when this tool asks “Draw on Map Canvas”. Currently:
- The user has a Canvas with an image, but no drawing tool.
- The user has another Canvas with a drawing tool, but no image.
- Log in to comment
Unfortunately, you can only draw on the QGIS Map Canvas.