Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] fixed commandline names in gdal algorithms
  • Loading branch information
volaya committed Oct 6, 2013
1 parent acbd165 commit 1b04c51
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 23 deletions.
3 changes: 3 additions & 0 deletions python/plugins/processing/gdal/gdaladdo.py
Expand Up @@ -64,6 +64,9 @@ class gdaladdo(GeoAlgorithm):
def getIcon(self):
filepath = os.path.dirname(__file__) + '/icons/raster-overview.png'
return QtGui.QIcon(filepath)

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

def defineCharacteristics(self):
self.name = 'Build overviews (pyramids)'
Expand Down
6 changes: 3 additions & 3 deletions python/plugins/processing/gdal/information.py
Expand Up @@ -27,13 +27,10 @@

import os
from PyQt4 import QtGui

from processing.core.GeoAlgorithm import GeoAlgorithm

from processing.parameters.ParameterRaster import ParameterRaster
from processing.parameters.ParameterBoolean import ParameterBoolean
from processing.outputs.OutputHTML import OutputHTML

from processing.gdal.GdalUtils import GdalUtils


Expand All @@ -47,6 +44,9 @@ class information(GeoAlgorithm):
def getIcon(self):
filepath = os.path.dirname(__file__) + '/icons/raster-info.png'
return QtGui.QIcon(filepath)

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

def defineCharacteristics(self):
self.name = 'Information'
Expand Down
4 changes: 4 additions & 0 deletions python/plugins/processing/gdal/ogr2ogr.py
Expand Up @@ -110,6 +110,10 @@ def defineCharacteristics(self):
''))

self.addOutput(OutputVector(self.OUTPUT_LAYER, 'Output layer'))

def commandLineName(self):
return "gdalogr:ogr2ogr"


def processAlgorithm(self, progress):
if not gdalAvailable:
Expand Down
3 changes: 3 additions & 0 deletions python/plugins/processing/gdal/ogrinfo.py
Expand Up @@ -56,6 +56,9 @@ def defineCharacteristics(self):
[ParameterVector.VECTOR_TYPE_ANY], False))

self.addOutput(OutputHTML(self.OUTPUT, 'Layer information'))

def commandLineName(self):
return "gdalogr:vectorinfo"

def processAlgorithm(self, progress):

Expand Down
7 changes: 3 additions & 4 deletions python/plugins/processing/gdal/polygonize.py
Expand Up @@ -25,15 +25,11 @@

__revision__ = '$Format:%H$'

import os
from PyQt4 import QtGui, QtCore

from processing.core.GeoAlgorithm import GeoAlgorithm

from processing.parameters.ParameterRaster import ParameterRaster
from processing.parameters.ParameterString import ParameterString
from processing.outputs.OutputVector import OutputVector

from processing.tools.system import *

from processing.gdal.GdalUtils import GdalUtils
Expand All @@ -48,6 +44,9 @@ class polygonize(GeoAlgorithm):
def getIcon(self):
filepath = os.path.dirname(__file__) + '/icons/polygonize.png'
return QtGui.QIcon(filepath)

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

def defineCharacteristics(self):
self.name = 'Polygonize (raster to vector)'
Expand Down
9 changes: 4 additions & 5 deletions python/plugins/processing/gdal/proximity.py
Expand Up @@ -26,18 +26,14 @@
__revision__ = '$Format:%H$'

import os
from PyQt4 import QtGui, QtCore

from PyQt4 import QtGui
from processing.core.GeoAlgorithm import GeoAlgorithm

from processing.parameters.ParameterRaster import ParameterRaster
from processing.parameters.ParameterString import ParameterString
from processing.parameters.ParameterSelection import ParameterSelection
from processing.parameters.ParameterNumber import ParameterNumber
from processing.outputs.OutputRaster import OutputRaster

from processing.tools.system import *

from processing.gdal.GdalUtils import GdalUtils


Expand All @@ -56,6 +52,9 @@ class proximity(GeoAlgorithm):
def getIcon(self):
filepath = os.path.dirname(__file__) + '/icons/proximity.png'
return QtGui.QIcon(filepath)

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

def defineCharacteristics(self):
self.name = 'Proximity (raster distance)'
Expand Down
10 changes: 5 additions & 5 deletions python/plugins/processing/gdal/rasterize.py
Expand Up @@ -25,19 +25,16 @@

__revision__ = '$Format:%H$'

import os
from PyQt4 import QtGui, QtCore

from PyQt4 import QtGui

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.tools.system import *

from processing.parameters.ParameterVector import ParameterVector
from processing.parameters.ParameterTableField import ParameterTableField
from processing.parameters.ParameterSelection import ParameterSelection
from processing.parameters.ParameterNumber import ParameterNumber

from processing.outputs.OutputRaster import OutputRaster

from processing.gdal.GdalUtils import GdalUtils


Expand All @@ -53,6 +50,9 @@ class rasterize(GeoAlgorithm):
def getIcon(self):
filepath = os.path.dirname(__file__) + '/icons/rasterize.png'
return QtGui.QIcon(filepath)

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

def defineCharacteristics(self):
self.name = 'Rasterize (vector to raster)'
Expand Down
3 changes: 3 additions & 0 deletions python/plugins/processing/gdal/translate.py
Expand Up @@ -57,6 +57,9 @@ class translate(GeoAlgorithm):
def getIcon(self):
filepath = os.path.dirname(__file__) + '/icons/translate.png'
return QtGui.QIcon(filepath)

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

def defineCharacteristics(self):
self.name = 'Translate (convert format)'
Expand Down
12 changes: 6 additions & 6 deletions python/plugins/processing/gui/help/algclasssification.txt
@@ -1,15 +1,15 @@
gdalogr:buildpyramidsoverviews,USE_ORIGINAL_NAME,Raster/Creation
gdalogr:overviews,USE_ORIGINAL_NAME,Raster/Creation
gdalogr:executesql,Execute SQL on vector layer,Vector/General tools
gdalogr:information,Raster layer information,Raster/General tools
gdalogr:rasterinfo,Raster layer information,Raster/General tools
gdalogr:merge,USE_ORIGINAL_NAME,Raster/General tools
gdalogr:nearblack,USE_ORIGINAL_NAME,Raster/Analysis
gdalogr:ogr2ogr,Export vector layer,Vector/General tools
gdalogr:ogrinfo,Vector layer information,Vector/Statistics
gdalogr:pct2rgb,PCT to RGB,Images/Image Manipulation
gdalogr:vectorinfo,Vector layer information,Vector/Statistics
gdalogr:pcttorgb,PCT to RGB,Images/Image Manipulation
gdalogr:proximity,USE_ORIGINAL_NAME,Raster/Analysis
gdalogr:rgb2pct,RGB to PCT,Images/Image Manipulation
gdalogr:rgbtopct,RGB to PCT,Images/Image Manipulation
gdalogr:sieve,Remove small pixel clumps (nearest neighbour),Raster/Edition
gdalogr:translateconvertformat,Export raster layer,Raster/General tools
gdalogr:translate,Export raster layer,Raster/General tools
gdalogr:warpreproject,Reproject raster layer,Raster/General tools
otb:bandmath,USE_ORIGINAL_NAME,Images/Miscellaneous
otb:binarymorphologicaloperation,USE_ORIGINAL_NAME,Images/Image Filtering
Expand Down

0 comments on commit 1b04c51

Please sign in to comment.