Skip to content
Permalink
Browse files
Default to vrt extension for build vrt alg output
  • Loading branch information
nyalldawson committed Aug 16, 2017
1 parent 0a7bb48 commit 48eccc3
Showing 1 changed file with 13 additions and 1 deletion.
@@ -57,6 +57,18 @@ def __init__(self):
super().__init__()

def initAlgorithm(self, config=None):

class ParameterVrtDestination(QgsProcessingParameterRasterDestination):

def __init__(self, name, description):
super().__init__(name, description)

def type(self):
return 'vrt_destination'

def defaultFileExtension(self):
return 'vrt'

self.addParameter(QgsProcessingParameterMultipleLayers(self.INPUT,
self.tr('Input layers'), QgsProcessing.TypeRaster))
self.addParameter(QgsProcessingParameterEnum(self.RESOLUTION,
@@ -65,7 +77,7 @@ def initAlgorithm(self, config=None):
self.tr('Layer stack'), defaultValue=True))
self.addParameter(QgsProcessingParameterBoolean(self.PROJ_DIFFERENCE,
self.tr('Allow projection difference'), defaultValue=False))
self.addParameter(QgsProcessingParameterRasterDestination(self.OUTPUT, self.tr('Virtual')))
self.addParameter(ParameterVrtDestination(self.OUTPUT, self.tr('Virtual')))

def name(self):
return 'buildvirtualraster'

1 comment on commit 48eccc3

@nirvn
Copy link
Contributor

@nirvn nirvn commented on 48eccc3 Aug 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat.

Please sign in to comment.