Skip to content

Commit

Permalink
[processing] fix test and menus after renaming GdalOgr provider
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 31, 2016
1 parent ce9c08f commit c5835e9
Show file tree
Hide file tree
Showing 19 changed files with 408 additions and 424 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridAverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridDataMetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridInvDist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridNearest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/gdal2tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/gdaladdo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/information.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
3 changes: 3 additions & 0 deletions python/plugins/processing/algs/gdal/ogrinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/polygonize.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/proximity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/rasterize.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/rasterize_over.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/retile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down
34 changes: 17 additions & 17 deletions python/plugins/processing/gui/algnames.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
62 changes: 31 additions & 31 deletions python/plugins/processing/gui/menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
Loading

0 comments on commit c5835e9

Please sign in to comment.