Skip to content
Permalink
Browse files

[processing] fix test and menus after renaming GdalOgr provider

  • Loading branch information
alexbruy committed Dec 31, 2016
1 parent ce9c08f commit c5835e9adc1f11326f166c6695cfa6fe14f1025f
@@ -60,7 +60,7 @@ def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))

def commandLineName(self):
return "gdalogr:gridaverage"
return "gdal:gridaverage"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Grid (Moving average)')
@@ -65,7 +65,7 @@ def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))

def commandLineName(self):
return "gdalogr:griddatametrics"
return "gdal:griddatametrics"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Grid (Data metrics)')
@@ -64,7 +64,7 @@ def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))

def commandLineName(self):
return "gdalogr:gridinvdist"
return "gdal:gridinvdist"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Grid (Inverse distance to a power)')
@@ -60,7 +60,7 @@ def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))

def commandLineName(self):
return "gdalogr:gridnearestneighbor"
return "gdal:gridnearestneighbor"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Grid (Nearest neighbor)')
@@ -61,7 +61,7 @@ class gdal2tiles(GdalAlgorithm):
WEBVIEWERS = ['all', 'google', 'openlayers', 'leaflet', 'none']

def commandLineName(self):
return "gdalogr:gdal2tiles"
return "gdal:gdal2tiles"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('gdal2tiles')
@@ -67,7 +67,7 @@ def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'raster-overview.png'))

def commandLineName(self):
return "gdalogr:overviews"
return "gdal:overviews"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Build overviews (pyramids)')
@@ -50,7 +50,7 @@ def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'raster-info.png'))

def commandLineName(self):
return "gdalorg:rasterinfo"
return "gdal:gdalinfo"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Information')
@@ -43,6 +43,9 @@ class OgrInfo(GdalAlgorithm):
SUMMARY_ONLY = 'SUMMARY_ONLY'
OUTPUT = 'OUTPUT'

def commandLineName(self):
return "gdal:ogrinfo"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Information')
self.group, self.i18n_group = self.trAlgorithm('[OGR] Miscellaneous')
@@ -50,7 +50,7 @@ def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'polygonize.png'))

def commandLineName(self):
return "gdalogr:polygonize"
return "gdal:polygonize"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Polygonize (raster to vector)')
@@ -61,7 +61,7 @@ def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'proximity.png'))

def commandLineName(self):
return "gdalogr:proximity"
return "gdal:proximity"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Proximity (raster distance)')
@@ -74,7 +74,7 @@ def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'rasterize.png'))

def commandLineName(self):
return "gdalogr:rasterize"
return "gdal:rasterize"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Rasterize (vector to raster)')
@@ -52,7 +52,7 @@ def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'rasterize.png'))

def commandLineName(self):
return "gdalogr:rasterize_over"
return "gdal:rasterize_over"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Rasterize (write over existing raster)')
@@ -61,7 +61,7 @@ class retile(GdalAlgorithm):
ALGO = ['near', 'bilinear', 'cubic', 'cubicspline', 'lanczos']

def commandLineName(self):
return "gdalogr:retile"
return "gdal:retile"

def commandName(self):
return "gdal_retile"
@@ -73,7 +73,7 @@ def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'translate.png'))

def commandLineName(self):
return "gdalogr:translate"
return "gdal:translate"

def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Translate (convert format)')
@@ -1,20 +1,20 @@
gdalogr:executesql,Execute SQL on vector layer
gdalogr:rasterinfo,Raster layer information
gdalogr:merge,Merge raster layers
gdalogr:ogr2ogr,Export vector layer
gdalogr:vectorinfo,Vector layer information
gdalogr:pcttorgb,PCT to RGB
gdalogr:rgbtopct,RGB to PCT
gdalogr:sieve,Remove small pixel clumps (nearest neighbour)
gdalogr:translate,Export raster layer
gdalogr:warpreproject,Reproject raster layer
gdalogr:polygonize,Vectorize raster layer
gdalogr:gridrasterize,Rasterize vector layer
gdalogr:gridnearestneighbor,Interpolate (Nearest Neighbor)
gdalogr:griddatametrics,Interpolate (Data metrics)
gdalogr:gridinvdist,Interpolate (Inverse distance weighting)
gdalogr:gridaverage,Interpolate (Average)
gdalogr:contour,Contour lines
gdal:executesql,Execute SQL on vector layer
gdal:rasterinfo,Raster layer information
gdal:merge,Merge raster layers
gdal:ogr2ogr,Export vector layer
gdal:vectorinfo,Vector layer information
gdal:pcttorgb,PCT to RGB
gdal:rgbtopct,RGB to PCT
gdal:sieve,Remove small pixel clumps (nearest neighbour)
gdal:translate,Export raster layer
gdal:warpreproject,Reproject raster layer
gdal:polygonize,Vectorize raster layer
gdal:gridrasterize,Rasterize vector layer
gdal:gridnearestneighbor,Interpolate (Nearest Neighbor)
gdal:griddatametrics,Interpolate (Data metrics)
gdal:gridinvdist,Interpolate (Inverse distance weighting)
gdal:gridaverage,Interpolate (Average)
gdal:contour,Contour lines
qgis:creategrid,Create graticule
saga:changegridvalues,Reclassify (simple)
saga:creategraticule,Create graticule from extent
@@ -73,41 +73,41 @@

rasterMenu = Processing.tr('&Raster')
projectionsMenu = rasterMenu + "/" + Processing.tr('Projections')
defaultMenuEntries.update({'gdalogr:warpreproject':projectionsMenu,
'gdalogr:assignprojection':projectionsMenu,
'gdalogr:extractprojection':projectionsMenu})
defaultMenuEntries.update({'gdal:warpreproject':projectionsMenu,
'gdal:assignprojection':projectionsMenu,
'gdal:extractprojection':projectionsMenu})
conversionMenu = rasterMenu + "/" + Processing.tr('Conversion')
defaultMenuEntries.update({'gdalogr:rasterize':conversionMenu,
'gdalogr:rasterize_over':conversionMenu,
'gdalogr:polygonize':conversionMenu,
'gdalogr:translate':conversionMenu,
'gdalogr:rgbtopct':conversionMenu,
'gdalogr:pcttorgb':conversionMenu})
defaultMenuEntries.update({'gdal:rasterize':conversionMenu,
'gdal:rasterize_over':conversionMenu,
'gdal:polygonize':conversionMenu,
'gdal:translate':conversionMenu,
'gdal:rgbtopct':conversionMenu,
'gdal:pcttorgb':conversionMenu})
extractionMenu = rasterMenu + "/" + Processing.tr('Extraction')
defaultMenuEntries.update({'gdalogr:contour':extractionMenu,
'gdalogr:cliprasterbyextent':extractionMenu,
'gdalogr:cliprasterbymasklayer':extractionMenu})
defaultMenuEntries.update({'gdal:contour':extractionMenu,
'gdal:cliprasterbyextent':extractionMenu,
'gdal:cliprasterbymasklayer':extractionMenu})
analysisMenu = rasterMenu + "/" + Processing.tr('Analysis')
defaultMenuEntries.update({'gdalogr:sieve':analysisMenu,
'gdalogr:nearblack':analysisMenu,
'gdalogr:fillnodata':analysisMenu,
'gdalogr:proximity':analysisMenu,
'gdalogr:griddatametrics':analysisMenu,
'gdalogr:gridaverage':analysisMenu,
'gdalogr:gridinvdist':analysisMenu,
'gdalogr:gridnearestneighbor':analysisMenu,
'gdalogr:aspect':analysisMenu,
'gdalogr:hillshade':analysisMenu,
'gdalogr:roughness':analysisMenu,
'gdalogr:slope':analysisMenu,
'gdalogr:tpi':analysisMenu,
'gdalogr:tri':analysisMenu})
defaultMenuEntries.update({'gdal:sieve':analysisMenu,
'gdal:nearblack':analysisMenu,
'gdal:fillnodata':analysisMenu,
'gdal:proximity':analysisMenu,
'gdal:griddatametrics':analysisMenu,
'gdal:gridaverage':analysisMenu,
'gdal:gridinvdist':analysisMenu,
'gdal:gridnearestneighbor':analysisMenu,
'gdal:aspect':analysisMenu,
'gdal:hillshade':analysisMenu,
'gdal:roughness':analysisMenu,
'gdal:slope':analysisMenu,
'gdal:tpi':analysisMenu,
'gdal:tri':analysisMenu})
miscMenu = rasterMenu + "/" + Processing.tr('Miscellaneous')
defaultMenuEntries.update({'gdalogr:buildvirtualraster':miscMenu,
'gdalogr:merge':miscMenu,
'gdalogr:rasterinfo':miscMenu,
'gdalogr:overviews':miscMenu,
'gdalogr:tileindex':miscMenu})
defaultMenuEntries.update({'gdal:buildvirtualraster':miscMenu,
'gdal:merge':miscMenu,
'gdal:rasterinfo':miscMenu,
'gdal:overviews':miscMenu,
'gdal:tileindex':miscMenu})


def initializeMenus():

0 comments on commit c5835e9

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