Skip to content

Processing Algorithms: Spatial Extent Widget does not show layers #1412

@jakimowb

Description

@jakimowb

The SpatialExtent widget does not list the layers which are opened in the EnMAP-Box.
All of it's context menu entries relate to the main QGIS map canvas but not that used in the EnMAP-Box.

  • Calculate from Layer -> should allow to select EnMAP-Box layers
  • Calculate from Layout Map
  • Calculate from Bookmark
  • Use current map canvas extent
  • Draw on Map Canvas -> should allow to draw on EnMAP-Box canvas

Workaround

ensure that current layers are temporarelliy added to QgsProject.instance()

Reason

The QgsProcessingExtentParameterDefinitionWidget does not consider the context / widgetContext, e.g. to use a QgsProject different to QgsProject.instance().

How to reproduce

  1. Open EnMAP-Box
  2. Project -> Add Example data
  3. Data Sources, Context menu "enmap_potsdam" -> open "Translate Raster Layer"
  4. Open Advanced Parameters and try to set the Spatial Extent
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions