Skip to content

Commit 1b04c51

Browse files
committed
[processing] fixed commandline names in gdal algorithms
1 parent acbd165 commit 1b04c51

File tree

9 files changed

+34
-23
lines changed

9 files changed

+34
-23
lines changed

python/plugins/processing/gdal/gdaladdo.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ class gdaladdo(GeoAlgorithm):
6464
def getIcon(self):
6565
filepath = os.path.dirname(__file__) + '/icons/raster-overview.png'
6666
return QtGui.QIcon(filepath)
67+
68+
def commandLineName(self):
69+
return "gdalogr:overviews"
6770

6871
def defineCharacteristics(self):
6972
self.name = 'Build overviews (pyramids)'

python/plugins/processing/gdal/information.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,10 @@
2727

2828
import os
2929
from PyQt4 import QtGui
30-
3130
from processing.core.GeoAlgorithm import GeoAlgorithm
32-
3331
from processing.parameters.ParameterRaster import ParameterRaster
3432
from processing.parameters.ParameterBoolean import ParameterBoolean
3533
from processing.outputs.OutputHTML import OutputHTML
36-
3734
from processing.gdal.GdalUtils import GdalUtils
3835

3936

@@ -47,6 +44,9 @@ class information(GeoAlgorithm):
4744
def getIcon(self):
4845
filepath = os.path.dirname(__file__) + '/icons/raster-info.png'
4946
return QtGui.QIcon(filepath)
47+
48+
def commandLineName(self):
49+
return "gdalorg:rasterinfo"
5050

5151
def defineCharacteristics(self):
5252
self.name = 'Information'

python/plugins/processing/gdal/ogr2ogr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ def defineCharacteristics(self):
110110
''))
111111

112112
self.addOutput(OutputVector(self.OUTPUT_LAYER, 'Output layer'))
113+
114+
def commandLineName(self):
115+
return "gdalogr:ogr2ogr"
116+
113117

114118
def processAlgorithm(self, progress):
115119
if not gdalAvailable:

python/plugins/processing/gdal/ogrinfo.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ def defineCharacteristics(self):
5656
[ParameterVector.VECTOR_TYPE_ANY], False))
5757

5858
self.addOutput(OutputHTML(self.OUTPUT, 'Layer information'))
59+
60+
def commandLineName(self):
61+
return "gdalogr:vectorinfo"
5962

6063
def processAlgorithm(self, progress):
6164

python/plugins/processing/gdal/polygonize.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,11 @@
2525

2626
__revision__ = '$Format:%H$'
2727

28-
import os
2928
from PyQt4 import QtGui, QtCore
30-
3129
from processing.core.GeoAlgorithm import GeoAlgorithm
32-
3330
from processing.parameters.ParameterRaster import ParameterRaster
3431
from processing.parameters.ParameterString import ParameterString
3532
from processing.outputs.OutputVector import OutputVector
36-
3733
from processing.tools.system import *
3834

3935
from processing.gdal.GdalUtils import GdalUtils
@@ -48,6 +44,9 @@ class polygonize(GeoAlgorithm):
4844
def getIcon(self):
4945
filepath = os.path.dirname(__file__) + '/icons/polygonize.png'
5046
return QtGui.QIcon(filepath)
47+
48+
def commandLineName(self):
49+
return "gdalogr:polygonize"
5150

5251
def defineCharacteristics(self):
5352
self.name = 'Polygonize (raster to vector)'

python/plugins/processing/gdal/proximity.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,14 @@
2626
__revision__ = '$Format:%H$'
2727

2828
import os
29-
from PyQt4 import QtGui, QtCore
30-
29+
from PyQt4 import QtGui
3130
from processing.core.GeoAlgorithm import GeoAlgorithm
32-
3331
from processing.parameters.ParameterRaster import ParameterRaster
3432
from processing.parameters.ParameterString import ParameterString
3533
from processing.parameters.ParameterSelection import ParameterSelection
3634
from processing.parameters.ParameterNumber import ParameterNumber
3735
from processing.outputs.OutputRaster import OutputRaster
38-
3936
from processing.tools.system import *
40-
4137
from processing.gdal.GdalUtils import GdalUtils
4238

4339

@@ -56,6 +52,9 @@ class proximity(GeoAlgorithm):
5652
def getIcon(self):
5753
filepath = os.path.dirname(__file__) + '/icons/proximity.png'
5854
return QtGui.QIcon(filepath)
55+
56+
def commandLineName(self):
57+
return "gdalogr:proximity"
5958

6059
def defineCharacteristics(self):
6160
self.name = 'Proximity (raster distance)'

python/plugins/processing/gdal/rasterize.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,16 @@
2525

2626
__revision__ = '$Format:%H$'
2727

28-
import os
29-
from PyQt4 import QtGui, QtCore
28+
29+
from PyQt4 import QtGui
3030

3131
from processing.core.GeoAlgorithm import GeoAlgorithm
3232
from processing.tools.system import *
33-
3433
from processing.parameters.ParameterVector import ParameterVector
3534
from processing.parameters.ParameterTableField import ParameterTableField
3635
from processing.parameters.ParameterSelection import ParameterSelection
3736
from processing.parameters.ParameterNumber import ParameterNumber
38-
3937
from processing.outputs.OutputRaster import OutputRaster
40-
4138
from processing.gdal.GdalUtils import GdalUtils
4239

4340

@@ -53,6 +50,9 @@ class rasterize(GeoAlgorithm):
5350
def getIcon(self):
5451
filepath = os.path.dirname(__file__) + '/icons/rasterize.png'
5552
return QtGui.QIcon(filepath)
53+
54+
def commandLineName(self):
55+
return "gdalogr:rasterize"
5656

5757
def defineCharacteristics(self):
5858
self.name = 'Rasterize (vector to raster)'

python/plugins/processing/gdal/translate.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class translate(GeoAlgorithm):
5757
def getIcon(self):
5858
filepath = os.path.dirname(__file__) + '/icons/translate.png'
5959
return QtGui.QIcon(filepath)
60+
61+
def commandLineName(self):
62+
return "gdalogr:translate"
6063

6164
def defineCharacteristics(self):
6265
self.name = 'Translate (convert format)'

python/plugins/processing/gui/help/algclasssification.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
gdalogr:buildpyramidsoverviews,USE_ORIGINAL_NAME,Raster/Creation
1+
gdalogr:overviews,USE_ORIGINAL_NAME,Raster/Creation
22
gdalogr:executesql,Execute SQL on vector layer,Vector/General tools
3-
gdalogr:information,Raster layer information,Raster/General tools
3+
gdalogr:rasterinfo,Raster layer information,Raster/General tools
44
gdalogr:merge,USE_ORIGINAL_NAME,Raster/General tools
55
gdalogr:nearblack,USE_ORIGINAL_NAME,Raster/Analysis
66
gdalogr:ogr2ogr,Export vector layer,Vector/General tools
7-
gdalogr:ogrinfo,Vector layer information,Vector/Statistics
8-
gdalogr:pct2rgb,PCT to RGB,Images/Image Manipulation
7+
gdalogr:vectorinfo,Vector layer information,Vector/Statistics
8+
gdalogr:pcttorgb,PCT to RGB,Images/Image Manipulation
99
gdalogr:proximity,USE_ORIGINAL_NAME,Raster/Analysis
10-
gdalogr:rgb2pct,RGB to PCT,Images/Image Manipulation
10+
gdalogr:rgbtopct,RGB to PCT,Images/Image Manipulation
1111
gdalogr:sieve,Remove small pixel clumps (nearest neighbour),Raster/Edition
12-
gdalogr:translateconvertformat,Export raster layer,Raster/General tools
12+
gdalogr:translate,Export raster layer,Raster/General tools
1313
gdalogr:warpreproject,Reproject raster layer,Raster/General tools
1414
otb:bandmath,USE_ORIGINAL_NAME,Images/Miscellaneous
1515
otb:binarymorphologicaloperation,USE_ORIGINAL_NAME,Images/Image Filtering

0 commit comments

Comments
 (0)