Skip to content

Commit

Permalink
[processing][gdal] Don't default to placing each input file in a sepa…
Browse files Browse the repository at this point in the history
…rate

band in build vrt algorithm

Creating a multi-band vrt is much less common vs creating a mosaic
style vrt, so set the default to the most common use case
and most predictable outcome.
  • Loading branch information
nyalldawson committed Nov 24, 2020
1 parent 83ccb65 commit b89d7fd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions python/plugins/processing/algs/gdal/buildvrt.py
Expand Up @@ -109,9 +109,15 @@ def isSupportedOutputValue(self, value, context):
self.tr('Resolution'),
options=[i[0] for i in self.RESOLUTION_OPTIONS],
defaultValue=0))
self.addParameter(QgsProcessingParameterBoolean(self.SEPARATE,

separate_param = QgsProcessingParameterBoolean(self.SEPARATE,
self.tr('Place each input file into a separate band'),
defaultValue=True))
defaultValue=True)
# default to not using separate bands is a friendlier option, but we can't change the parameter's actual
# defaultValue without breaking API!
separate_param.setGuiDefaultValueOverride(False)
self.addParameter(separate_param)

self.addParameter(QgsProcessingParameterBoolean(self.PROJ_DIFFERENCE,
self.tr('Allow projection difference'),
defaultValue=False))
Expand Down

0 comments on commit b89d7fd

Please sign in to comment.