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 48eccc379de45539adba9ae5064355adb90a4746
Showing with 13 additions and 1 deletion.
  1. +13 −1 python/plugins/processing/algs/gdal/buildvrt.py
@@ -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

This comment has been minimized.

Copy link
Contributor

@nirvn nirvn commented on 48eccc3 Aug 17, 2017

Neat.

Please sign in to comment.
You can’t perform that action at this time.