Skip to content
Permalink
Browse files

[needs-docs][processing] Move Build Vector VRT to gdal provider

and setup alias to avoid script/model breakage. This algorithm
uses GDAL utilities and fits better alongside the other GDAL based
algorithm rather than in the qgis provider.
  • Loading branch information
nyalldawson committed Jan 5, 2020
1 parent 2dcdfe3 commit 42885bfbb7f15eb83bbc9812123734cc9b22839b
@@ -30,28 +30,34 @@
QgsProcessingParameterVectorDestination,
QgsProcessingOutputString
)
from processing.algs.qgis.QgisAlgorithm import QgisAlgorithm
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.algs.gdal.GdalUtils import GdalUtils


class Datasources2Vrt(QgisAlgorithm):
class Datasources2Vrt(GdalAlgorithm):
INPUT = 'INPUT'
UNIONED = 'UNIONED'
OUTPUT = 'OUTPUT'
VRT_STRING = 'VRT_STRING'

def createCustomParametersWidget(self, parent):
return None

def group(self):
return self.tr('Vector general')
return self.tr('Vector miscellaneous')

def groupId(self):
return 'vectorgeneral'
return 'vectormiscellaneous'

def name(self):
return 'buildvirtualvector'

def displayName(self):
return self.tr('Build virtual vector')

def tags(self):
return ['ogr', 'gdal', 'vrt', 'create']

def __init__(self):
super().__init__()

@@ -38,6 +38,7 @@
from .ClipRasterByMask import ClipRasterByMask
from .ColorRelief import ColorRelief
from .contour import contour
from .Datasources2Vrt import Datasources2Vrt
from .fillnodata import fillnodata
from .gdalinfo import gdalinfo
from .gdal2tiles import gdal2tiles
@@ -99,6 +100,7 @@ class GdalAlgorithmProvider(QgsProcessingProvider):
def __init__(self):
super().__init__()
self.algs = []
QgsApplication.processingRegistry().addAlgorithmAlias('qgis:buildvirtualvector', 'gdal:buildvirtualvector')

def load(self):
ProcessingConfig.settingIcons[self.name()] = self.icon()
@@ -145,6 +147,7 @@ def loadAlgorithms(self):
ClipRasterByMask(),
ColorRelief(),
contour(),
Datasources2Vrt(),
fillnodata(),
gdalinfo(),
gdal2tiles(),
@@ -35,7 +35,6 @@
from .CheckValidity import CheckValidity
from .Climb import Climb
from .ConcaveHull import ConcaveHull
from .Datasources2Vrt import Datasources2Vrt
from .DefineProjection import DefineProjection
from .Delaunay import Delaunay
from .DeleteColumn import DeleteColumn
@@ -117,7 +116,6 @@ def getAlgs(self):
CheckValidity(),
Climb(),
ConcaveHull(),
Datasources2Vrt(),
DefineProjection(),
Delaunay(),
DeleteColumn(),

0 comments on commit 42885bf

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