Skip to content

Processing toolbox: support disabling some functions based on layer data #747

@mfisher87

Description

@mfisher87

I think we can get there by making layer processing functions more declarative in a data structure. For example, a mapping like:

PROCESSING_TOOLBOX = {
  'buffer': {
    title: '...'
    description: '...',
    predicate: isVectorLayer,
    gdalCommandTemplate: [ ... ],
  },
  'extractCentroids': {
    title: 'Extract centroids',
    description: 'Calculate centroid points for each feature in the layer',
    predicate: isPolygonLayer,
    gdalCommandTemplate: [ ... ],
  },
 // ...
}

A predicate function could be any function that accepts a layer and returns a boolean.

See post by @arjxn-py in #744 (review)

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