[processing] add icons for fTools and GDALTools algorithms

This commit is contained in:
Alexander Bruy 2016-01-25 15:42:11 +02:00
parent 9b9c692be2
commit 11a9a66104
133 changed files with 657 additions and 29 deletions

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2013, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
@ -37,6 +41,8 @@ from processing.core.parameters import ParameterBoolean
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class ClipByExtent(GdalAlgorithm):
@ -57,6 +63,9 @@ class ClipByExtent(GdalAlgorithm):
COMPRESSTYPE = ['NONE', 'JPEG', 'LZW', 'PACKBITS', 'DEFLATE']
TFW = 'TFW'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'raster-clip.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Clip raster by extent')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Extraction')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2013, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from osgeo import gdal
from processing.core.parameters import ParameterRaster
@ -42,6 +46,8 @@ from processing.algs.gdal.GdalUtils import GdalUtils
from processing.tools import dataobjects
from processing.tools.vector import ogrConnectionString
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class ClipByMask(GdalAlgorithm):
@ -65,6 +71,9 @@ class ClipByMask(GdalAlgorithm):
COMPRESSTYPE = ['NONE', 'JPEG', 'LZW', 'PACKBITS', 'DEFLATE']
TFW = 'TFW'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'raster-clip.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Clip raster by mask layer')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Extraction')

View File

@ -27,6 +27,8 @@ __revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterTableField
@ -35,6 +37,8 @@ from processing.core.parameters import ParameterSelection
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class GridAverage(GdalAlgorithm):
@ -50,6 +54,9 @@ class GridAverage(GdalAlgorithm):
TYPE = ['Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64']
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))
def commandLineName(self):
return "gdalogr:gridaverage"

View File

@ -27,6 +27,8 @@ __revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterTableField
@ -35,6 +37,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class GridDataMetrics(GdalAlgorithm):
@ -54,6 +58,9 @@ class GridDataMetrics(GdalAlgorithm):
DATA_METRICS = ['Minimum', 'Maximum', 'Range', 'Count', 'Average distance',
'Average distance between points']
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))
def commandLineName(self):
return "gdalogr:griddatametrics"

View File

@ -28,6 +28,8 @@ __revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterTableField
@ -36,6 +38,8 @@ from processing.core.parameters import ParameterSelection
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class GridInvDist(GdalAlgorithm):
@ -54,6 +58,9 @@ class GridInvDist(GdalAlgorithm):
TYPE = ['Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64']
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))
def commandLineName(self):
return "gdalogr:gridinvdist"

View File

@ -28,6 +28,8 @@ __revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterTableField
@ -36,6 +38,8 @@ from processing.core.parameters import ParameterSelection
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class GridNearest(GdalAlgorithm):
@ -50,6 +54,9 @@ class GridNearest(GdalAlgorithm):
TYPE = ['Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64']
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))
def commandLineName(self):
return "gdalogr:gridnearestneighbor"

View File

@ -25,6 +25,9 @@ __copyright__ = '(C) 2013, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
@ -33,6 +36,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class aspect(GdalAlgorithm):
@ -45,8 +50,7 @@ class aspect(GdalAlgorithm):
OUTPUT = 'OUTPUT'
#def getIcon(self):
# filepath = os.path.dirname(__file__) + '/icons/dem.png'
# return QIcon(filepath)
# return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'dem.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Aspect')

View File

@ -25,6 +25,9 @@ __copyright__ = '(C) 2014, Radoslaw Guzinski'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.outputs import OutputRaster
@ -34,7 +37,7 @@ from processing.core.parameters import ParameterSelection
from processing.algs.gdal.GdalUtils import GdalUtils
from processing.tools.system import tempFolder
import os
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class buildvrt(GdalAlgorithm):
@ -47,6 +50,9 @@ class buildvrt(GdalAlgorithm):
RESOLUTION_OPTIONS = ['average', 'highest', 'lowest']
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'vrt.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Build Virtual Raster')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Miscellaneous')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2013, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
@ -35,6 +39,8 @@ from processing.core.outputs import OutputVector
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class contour(GdalAlgorithm):
@ -44,6 +50,9 @@ class contour(GdalAlgorithm):
FIELD_NAME = 'FIELD_NAME'
EXTRA = 'EXTRA'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'contour.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Contour')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Extraction')

View File

@ -27,18 +27,25 @@ __revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from osgeo import gdal, osr
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterBoolean
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class ExtractProjection(GdalAlgorithm):
INPUT = 'INPUT'
PRJ_FILE = 'PRJ_FILE'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'projection-export.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Extract projection')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Projections')

View File

@ -25,6 +25,9 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
@ -37,6 +40,8 @@ from processing.tools.system import isWindows
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class fillnodata(GdalAlgorithm):
@ -48,6 +53,9 @@ class fillnodata(GdalAlgorithm):
NO_DEFAULT_MASK = 'NO_DEFAULT_MASK'
OUTPUT = 'OUTPUT'
#def getIcon(self):
# return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'fillnodata.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Fill nodata')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Analysis')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterBoolean
@ -34,6 +38,8 @@ from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class gdaladdo(GdalAlgorithm):
@ -57,6 +63,9 @@ class gdaladdo(GdalAlgorithm):
FORMATS = ['Internal (if possible)', 'External (GTiff .ovr)',
'External (ERDAS Imagine .aux)']
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'raster-overview.png'))
def commandLineName(self):
return "gdalogr:overviews"

View File

@ -25,6 +25,9 @@ __copyright__ = '(C) 2015, Pedro Venancio'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.outputs import OutputVector
@ -33,7 +36,7 @@ from processing.core.parameters import ParameterMultipleInput
from processing.core.parameters import ParameterString
from processing.algs.gdal.GdalUtils import GdalUtils
import os
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class gdaltindex(GdalAlgorithm):
@ -43,6 +46,9 @@ class gdaltindex(GdalAlgorithm):
FIELD_NAME = 'FIELD_NAME'
PROJ_DIFFERENCE = 'PROJ_DIFFERENCE'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'tiles.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Tile Index')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Miscellaneous')

View File

@ -26,6 +26,10 @@ __copyright__ = '(C) 2013, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterBoolean
@ -33,6 +37,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class hillshade(GdalAlgorithm):
@ -46,6 +52,9 @@ class hillshade(GdalAlgorithm):
ALTITUDE = 'ALTITUDE'
OUTPUT = 'OUTPUT'
#def getIcon(self):
# return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'dem.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Hillshade')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Analysis')

View File

@ -25,12 +25,18 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterBoolean
from processing.core.outputs import OutputHTML
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class information(GdalAlgorithm):
@ -39,6 +45,9 @@ class information(GdalAlgorithm):
NOGCP = 'NOGCP'
NOMETADATA = 'NOMETADATA'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'raster-info.png'))
def commandLineName(self):
return "gdalorg:rasterinfo"

View File

@ -25,6 +25,9 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.outputs import OutputRaster
@ -34,6 +37,8 @@ from processing.core.parameters import ParameterSelection
from processing.tools.system import isWindows
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class merge(GdalAlgorithm):
@ -45,6 +50,9 @@ class merge(GdalAlgorithm):
TYPE = ['Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64']
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'merge.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Merge')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Miscellaneous')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterNumber
@ -32,6 +36,8 @@ from processing.core.parameters import ParameterBoolean
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class nearblack(GdalAlgorithm):
@ -40,6 +46,9 @@ class nearblack(GdalAlgorithm):
NEAR = 'NEAR'
WHITE = 'WHITE'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'nearblack.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Near black')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Analysis')

View File

@ -25,6 +25,9 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.tools.system import isWindows
@ -33,6 +36,8 @@ from processing.core.parameters import ParameterSelection
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class pct2rgb(GdalAlgorithm):
@ -40,6 +45,9 @@ class pct2rgb(GdalAlgorithm):
OUTPUT = 'OUTPUT'
NBAND = 'NBAND'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', '8-to-24-bits.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('PCT to RGB')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Conversion')

View File

@ -25,7 +25,11 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
from PyQt4 import QtCore
import os
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QFileInfo
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterString
@ -33,6 +37,8 @@ from processing.core.outputs import OutputVector
from processing.tools.system import isWindows
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class polygonize(GdalAlgorithm):
@ -40,6 +46,9 @@ class polygonize(GdalAlgorithm):
OUTPUT = 'OUTPUT'
FIELD = 'FIELD'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'polygonize.png'))
def commandLineName(self):
return "gdalogr:polygonize"
@ -59,7 +68,7 @@ class polygonize(GdalAlgorithm):
arguments.append('ESRI Shapefile')
output = self.getOutputValue(polygonize.OUTPUT)
arguments.append(output)
arguments.append(QtCore.QFileInfo(output).baseName())
arguments.append(QFileInfo(output).baseName())
arguments.append(self.getParameterValue(polygonize.FIELD))
commands = []

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterString
@ -34,6 +38,8 @@ from processing.core.outputs import OutputRaster
from processing.tools.system import isWindows
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class proximity(GdalAlgorithm):
@ -50,6 +56,9 @@ class proximity(GdalAlgorithm):
DISTUNITS = ['GEO', 'PIXEL']
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'proximity.png'))
def commandLineName(self):
return "gdalogr:proximity"

View File

@ -27,6 +27,8 @@ __revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterTableField
from processing.core.parameters import ParameterSelection
@ -40,6 +42,8 @@ from processing.algs.gdal.GdalUtils import GdalUtils
from processing.tools.vector import ogrConnectionString, ogrLayerName
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class rasterize(GdalAlgorithm):
@ -63,6 +67,9 @@ class rasterize(GdalAlgorithm):
COMPRESSTYPE = ['NONE', 'JPEG', 'LZW', 'PACKBITS', 'DEFLATE']
TFW = 'TFW'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'rasterize.png'))
def commandLineName(self):
return "gdalogr:rasterize"

View File

@ -27,6 +27,8 @@ __revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterTableField
@ -38,6 +40,8 @@ from processing.algs.gdal.GdalUtils import GdalUtils
from processing.tools.vector import ogrConnectionString, ogrLayerName
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class rasterize_over(GdalAlgorithm):
@ -45,6 +49,9 @@ class rasterize_over(GdalAlgorithm):
INPUT_RASTER = 'INPUT_RASTER'
FIELD = 'FIELD'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'rasterize.png'))
def commandLineName(self):
return "gdalogr:rasterize_over"

View File

@ -26,6 +26,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterNumber
@ -33,6 +37,8 @@ from processing.core.outputs import OutputRaster
from processing.tools.system import isWindows
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class rgb2pct(GdalAlgorithm):
@ -40,6 +46,9 @@ class rgb2pct(GdalAlgorithm):
OUTPUT = 'OUTPUT'
NCOLORS = 'NCOLORS'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', '24-to-8-bits.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('RGB to PCT')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Conversion')

View File

@ -25,6 +25,9 @@ __copyright__ = '(C) 2013, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
@ -33,6 +36,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class roughness(GdalAlgorithm):
@ -41,6 +46,9 @@ class roughness(GdalAlgorithm):
COMPUTE_EDGES = 'COMPUTE_EDGES'
OUTPUT = 'OUTPUT'
#def getIcon(self):
# return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'dem.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Roughness')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Analysis')

View File

@ -25,6 +25,9 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
@ -37,6 +40,8 @@ from processing.tools.system import isWindows
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class sieve(GdalAlgorithm):
@ -47,6 +52,9 @@ class sieve(GdalAlgorithm):
PIXEL_CONNECTIONS = ['4', '8']
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'sieve.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Sieve')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Analysis')

View File

@ -26,6 +26,10 @@ __copyright__ = '(C) 2013, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterBoolean
@ -33,6 +37,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class slope(GdalAlgorithm):
@ -44,6 +50,9 @@ class slope(GdalAlgorithm):
SCALE = 'SCALE'
OUTPUT = 'OUTPUT'
#def getIcon(self):
# return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'dem.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Slope')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Analysis')

View File

@ -26,6 +26,10 @@ __copyright__ = '(C) 2013, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterBoolean
@ -33,6 +37,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class tpi(GdalAlgorithm):
@ -41,6 +47,9 @@ class tpi(GdalAlgorithm):
COMPUTE_EDGES = 'COMPUTE_EDGES'
OUTPUT = 'OUTPUT'
#def getIcon(self):
# return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'dem.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('TPI (Topographic Position Index)')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Analysis')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterString
from processing.core.parameters import ParameterRaster
@ -37,6 +41,8 @@ from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class translate(GdalAlgorithm):
@ -62,6 +68,9 @@ class translate(GdalAlgorithm):
COMPRESSTYPE = ['NONE', 'JPEG', 'LZW', 'PACKBITS', 'DEFLATE']
TFW = 'TFW'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'translate.png'))
def commandLineName(self):
return "gdalogr:translate"

View File

@ -26,6 +26,10 @@ __copyright__ = '(C) 2013, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterBoolean
@ -33,6 +37,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class tri(GdalAlgorithm):
@ -41,6 +47,9 @@ class tri(GdalAlgorithm):
COMPUTE_EDGES = 'COMPUTE_EDGES'
OUTPUT = 'OUTPUT'
#def getIcon(self):
# return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'dem.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('TRI (Terrain Ruggedness Index)')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Analysis')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterSelection
@ -35,6 +39,8 @@ from processing.core.parameters import ParameterBoolean
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class warp(GdalAlgorithm):
@ -59,6 +65,9 @@ class warp(GdalAlgorithm):
COMPRESSTYPE = ['NONE', 'JPEG', 'LZW', 'PACKBITS', 'DEFLATE']
TFW = 'TFW'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'warp.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Warp (reproject)')
self.group, self.i18n_group = self.trAlgorithm('[GDAL] Projections')

View File

@ -25,10 +25,14 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
import math
import codecs
from PyQt4.QtGui import QIcon
from qgis.core import QgsStatisticalSummary
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterTableField
@ -37,6 +41,9 @@ from processing.core.outputs import OutputNumber
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class BasicStatisticsNumbers(GeoAlgorithm):
INPUT_LAYER = 'INPUT_LAYER'
@ -60,6 +67,9 @@ class BasicStatisticsNumbers(GeoAlgorithm):
NULLVALUES = 'NULLVALUES'
IQR = 'IQR'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'basic_statistics.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Basic statistics for numeric fields')
self.group, self.i18n_group = self.trAlgorithm('Vector table tools')

View File

@ -25,8 +25,11 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
import codecs
from PyQt4.QtGui import QIcon
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterTableField
@ -34,6 +37,8 @@ from processing.core.outputs import OutputHTML
from processing.core.outputs import OutputNumber
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class BasicStatisticsStrings(GeoAlgorithm):
@ -49,6 +54,9 @@ class BasicStatisticsStrings(GeoAlgorithm):
FILLED = 'FILLED'
UNIQUE = 'UNIQUE'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'basic_statistics.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Basic statistics for text fields')
self.group, self.i18n_group = self.trAlgorithm('Vector table tools')

View File

@ -25,19 +25,29 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsGeometry, QgsFeature
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class Centroids(GeoAlgorithm):
INPUT_LAYER = 'INPUT_LAYER'
OUTPUT_LAYER = 'OUTPUT_LAYER'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'centroids.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Polygon centroids')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')

View File

@ -25,7 +25,11 @@ __copyright__ = '(C) 2015, Arnaud Morvan'
__revision__ = '$Format:%H$'
from PyQt4 import QtCore
import os
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QSettings, QVariant
from qgis.core import QGis, QgsGeometry, QgsFeature, QgsField
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
@ -34,6 +38,7 @@ from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
settings_method_key = "/qgis/digitizing/validate_geometries"
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class CheckValidity(GeoAlgorithm):
@ -44,6 +49,9 @@ class CheckValidity(GeoAlgorithm):
INVALID_OUTPUT = 'INVALID_OUTPUT'
ERROR_OUTPUT = 'ERROR_OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'check_geometry.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Check validity')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')
@ -75,7 +83,7 @@ class CheckValidity(GeoAlgorithm):
self.tr('Error output')))
def processAlgorithm(self, progress):
settings = QtCore.QSettings()
settings = QSettings()
initial_method_setting = settings.value(settings_method_key, 1)
method = self.getParameterValue(self.METHOD)
@ -91,7 +99,7 @@ class CheckValidity(GeoAlgorithm):
self.getParameterValue(self.INPUT_LAYER))
provider = layer.dataProvider()
settings = QtCore.QSettings()
settings = QSettings()
method = int(settings.value(settings_method_key, 1))
valid_ouput = self.getOutputFromName(self.VALID_OUTPUT)
@ -105,7 +113,7 @@ class CheckValidity(GeoAlgorithm):
invalid_ouput = self.getOutputFromName(self.INVALID_OUTPUT)
invalid_fields = layer.pendingFields().toList() + [
QgsField(name='_errors',
type=QtCore.QVariant.String,
type=QVariant.String,
len=255)]
invalid_writer = invalid_ouput.getVectorWriter(
invalid_fields,
@ -116,7 +124,7 @@ class CheckValidity(GeoAlgorithm):
error_ouput = self.getOutputFromName(self.ERROR_OUTPUT)
error_fields = [
QgsField(name='message',
type=QtCore.QVariant.String,
type=QVariant.String,
len=255)]
error_writer = error_ouput.getVectorWriter(
error_fields,

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsFeature, QgsGeometry, QgsFeatureRequest, QgsWKBTypes
from processing.core.GeoAlgorithm import GeoAlgorithm
@ -34,6 +38,8 @@ from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
QGis.WKBMultiPolygon25D]
@ -45,6 +51,9 @@ class Clip(GeoAlgorithm):
OVERLAY = 'OVERLAY'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'clip.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Clip')
self.group, self.i18n_group = self.trAlgorithm('Vector overlay tools')

View File

@ -25,9 +25,13 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import QGis, QgsField, QgsFeature, QgsGeometry
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import ParameterVector
@ -36,6 +40,8 @@ from processing.core.parameters import ParameterSelection
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class ConvexHull(GeoAlgorithm):
@ -44,6 +50,9 @@ class ConvexHull(GeoAlgorithm):
FIELD = 'FIELD'
METHOD = 'METHOD'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'convex_hull.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Convex hull')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')

View File

@ -25,9 +25,14 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from sets import Set
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import QGis, QgsField, QgsFeatureRequest, QgsFeature, QgsGeometry, QgsPoint
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.tools import dataobjects, vector
@ -35,12 +40,17 @@ from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputVector
import voronoi
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class Delaunay(GeoAlgorithm):
INPUT = 'INPUT'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'delaunay.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Delaunay triangulation')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsFeature, QgsGeometry, QgsPoint
from processing.core.GeoAlgorithm import GeoAlgorithm
@ -33,6 +37,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class DensifyGeometries(GeoAlgorithm):

View File

@ -25,7 +25,11 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
from qgis.core import QGis, QgsFeatureRequest, QgsFeature, QgsGeometry
import os
from PyQt4.QtGui import QIcon
from qgis.core import QgsFeatureRequest, QgsFeature, QgsGeometry
from processing.core.ProcessingLog import ProcessingLog
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
@ -33,6 +37,8 @@ from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
QGis.WKBMultiPolygon25D]
@ -44,10 +50,8 @@ class Difference(GeoAlgorithm):
OVERLAY = 'OVERLAY'
OUTPUT = 'OUTPUT'
#==========================================================================
#def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/difference.png")
#==========================================================================
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'difference.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Difference')

View File

@ -25,7 +25,12 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QgsFeature, QgsGeometry
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import ParameterVector
@ -34,6 +39,8 @@ from processing.core.parameters import ParameterTableField
from processing.core.outputs import OutputVector
from processing.tools import vector, dataobjects
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class Dissolve(GeoAlgorithm):
@ -42,10 +49,8 @@ class Dissolve(GeoAlgorithm):
FIELD = 'FIELD'
DISSOLVE_ALL = 'DISSOLVE_ALL'
#==========================================================================
#def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/dissolve.png")
#==========================================================================
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'dissolve.png'))
def defineCharacteristics(self):
self.name = 'Dissolve'

View File

@ -25,8 +25,13 @@ __copyright__ = '(C) 2013, Bernhard Ströbl'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QLocale, QDate
from qgis.core import QgsFeatureRequest, QgsFeature, QgsGeometry
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.ProcessingLog import ProcessingLog
@ -38,6 +43,8 @@ from processing.core.parameters import ParameterSelection
from processing.core.outputs import OutputVector
from processing.tools import dataobjects
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class Eliminate(GeoAlgorithm):
@ -53,6 +60,9 @@ class Eliminate(GeoAlgorithm):
MODE_SMALLEST_AREA = 1
MODE_BOUNDARY = 2
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'eliminate.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Eliminate sliver polygons')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')

View File

@ -25,15 +25,22 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
from qgis.core import QGis, QgsProject, QgsCoordinateTransform, QgsFeature, QgsGeometry, QgsField
import os
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import QGis, QgsProject, QgsCoordinateTransform, QgsFeature, QgsGeometry, QgsField
from qgis.utils import iface
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterSelection
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class ExportGeometryInfo(GeoAlgorithm):
@ -41,6 +48,9 @@ class ExportGeometryInfo(GeoAlgorithm):
METHOD = 'CALC_METHOD'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'export_geometry.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Export/Add geometry columns')
self.group, self.i18n_group = self.trAlgorithm('Vector table tools')

View File

@ -25,14 +25,21 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import QGis, QgsField, QgsPoint, QgsGeometry, QgsFeature
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterBoolean
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class ExtentFromLayer(GeoAlgorithm):
@ -41,6 +48,9 @@ class ExtentFromLayer(GeoAlgorithm):
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'layer_extent.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Polygon from layer extent')
self.group, self.i18n_group = self.trAlgorithm('Vector general tools')

View File

@ -25,18 +25,28 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsFeature, QgsGeometry
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class ExtractNodes(GeoAlgorithm):
INPUT = 'INPUT'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'extract_nodes.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Extract nodes')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')

View File

@ -25,7 +25,12 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterBoolean
@ -34,6 +39,8 @@ from processing.core.outputs import OutputVector
import Buffer as buff
from processing.tools import dataobjects
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class FixedDistanceBuffer(GeoAlgorithm):
@ -44,6 +51,9 @@ class FixedDistanceBuffer(GeoAlgorithm):
SEGMENTS = 'SEGMENTS'
DISSOLVE = 'DISSOLVE'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'buffer.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Fixed distance buffer')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsFeatureRequest, QgsFeature, QgsGeometry, QgsWKBTypes
from processing.core.GeoAlgorithm import GeoAlgorithm
@ -34,6 +38,8 @@ from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
wkbTypeGroups = {
'Point': (QGis.WKBPoint, QGis.WKBMultiPoint, QGis.WKBPoint25D, QGis.WKBMultiPoint25D,),
'LineString': (QGis.WKBLineString, QGis.WKBMultiLineString, QGis.WKBLineString25D, QGis.WKBMultiLineString25D,),
@ -54,6 +60,9 @@ class Intersection(GeoAlgorithm):
INPUT2 = 'INPUT2'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'intersect.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Intersection')
self.group, self.i18n_group = self.trAlgorithm('Vector overlay tools')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QgsFeature
from processing.core.GeoAlgorithm import GeoAlgorithm
@ -34,6 +38,8 @@ from processing.core.parameters import ParameterTableField
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class JoinAttributes(GeoAlgorithm):

View File

@ -25,13 +25,20 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsFeatureRequest, QgsFeature, QgsGeometry
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterTableField
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class LinesIntersection(GeoAlgorithm):
@ -42,6 +49,9 @@ class LinesIntersection(GeoAlgorithm):
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'lines_intersection.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Line intersections')
self.group, self.i18n_group = self.trAlgorithm('Vector overlay tools')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsFeature, QgsGeometry
from processing.core.GeoAlgorithm import GeoAlgorithm
@ -32,12 +36,17 @@ from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class LinesToPolygons(GeoAlgorithm):
INPUT = 'INPUT'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'to_lines.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Lines to polygons')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')

View File

@ -25,14 +25,21 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import QGis, QgsField, QgsFeature, QgsGeometry, QgsPoint
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterTableField
from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class MeanCoords(GeoAlgorithm):
@ -42,6 +49,9 @@ class MeanCoords(GeoAlgorithm):
UID = 'UID'
WEIGHT = 'WEIGHT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'mean.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Mean coordinate(s)')
self.group, self.i18n_group = self.trAlgorithm('Vector analysis tools')

View File

@ -25,23 +25,28 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsFeature, QgsGeometry
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class MultipartToSingleparts(GeoAlgorithm):
INPUT = 'INPUT'
OUTPUT = 'OUTPUT'
# =========================================================================
# def getIcon(self):
# return QIcon(os.path.dirname(__file__) + "/icons/multi_to_single.png")
# =========================================================================
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'multi_to_single.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Multipart to singleparts')

View File

@ -25,28 +25,36 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
import math
import codecs
from PyQt4.QtGui import QIcon
from qgis.core import QgsFeatureRequest, QgsFeature, QgsDistanceArea
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputHTML
from processing.core.outputs import OutputNumber
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class NearestNeighbourAnalysis(GeoAlgorithm):
POINTS = 'POINTS'
OUTPUT = 'OUTPUT'
OBSERVED_MD = 'OBSERVED_MD'
EXPECTED_MD = 'EXPECTED_MD'
NN_INDEX = 'NN_INDEX'
POINT_COUNT = 'POINT_COUNT'
Z_SCORE = 'Z_SCORE'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'neighbour.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Nearest neighbour analysis')
self.group, self.i18n_group = self.trAlgorithm('Vector analysis tools')

View File

@ -25,8 +25,13 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
import math
from PyQt4.QtGui import QIcon
from qgis.core import QgsFeatureRequest, QgsFeature, QgsGeometry, QgsDistanceArea
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterNumber
from processing.core.parameters import ParameterVector
@ -35,6 +40,8 @@ from processing.core.parameters import ParameterTableField
from processing.core.outputs import OutputTable
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class PointDistance(GeoAlgorithm):
@ -46,6 +53,9 @@ class PointDistance(GeoAlgorithm):
NEAREST_POINTS = 'NEAREST_POINTS'
DISTANCE_MATRIX = 'DISTANCE_MATRIX'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'matrix.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Distance matrix')
self.group, self.i18n_group = self.trAlgorithm('Vector analysis tools')

View File

@ -25,14 +25,21 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import QgsGeometry, QgsFeatureRequest, QgsFeature, QgsField
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterString
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class PointsInPolygon(GeoAlgorithm):
@ -41,6 +48,9 @@ class PointsInPolygon(GeoAlgorithm):
OUTPUT = 'OUTPUT'
FIELD = 'FIELD'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'sum_points.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Count points in polygon')
self.group, self.i18n_group = self.trAlgorithm('Vector analysis tools')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsFeature, QgsGeometry
from processing.core.GeoAlgorithm import GeoAlgorithm
@ -32,12 +36,17 @@ from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class PolygonsToLines(GeoAlgorithm):
INPUT = 'INPUT'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'to_lines.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Polygons to lines')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')

View File

@ -25,8 +25,10 @@ __copyright__ = '(C) 2014, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
import random
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import (QGis, QgsGeometry, QgsRectangle, QgsFeature, QgsFields,
QgsField, QgsSpatialIndex, QgsPoint)
@ -39,6 +41,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputVector
from processing.tools import vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class RandomPointsExtent(GeoAlgorithm):
@ -47,6 +51,9 @@ class RandomPointsExtent(GeoAlgorithm):
MIN_DISTANCE = 'MIN_DISTANCE'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'random_points.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Random points in extent')
self.group, self.i18n_group = self.trAlgorithm('Vector creation tools')

View File

@ -25,8 +25,10 @@ __copyright__ = '(C) 2014, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
import random
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import (QGis, QgsGeometry, QgsFields, QgsField, QgsSpatialIndex,
QgsPoint, QgsFeature, QgsFeatureRequest)
@ -38,6 +40,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class RandomPointsLayer(GeoAlgorithm):
@ -46,6 +50,9 @@ class RandomPointsLayer(GeoAlgorithm):
MIN_DISTANCE = 'MIN_DISTANCE'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'random_points.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Random points in layer bounds')
self.group, self.i18n_group = self.trAlgorithm('Vector creation tools')

View File

@ -25,8 +25,10 @@ __copyright__ = '(C) 2014, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
import random
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import (QGis, QgsFields, QgsField, QgsDistanceArea, QgsGeometry,
QgsSpatialIndex, QgsPoint, QgsFeature)
@ -39,6 +41,8 @@ from processing.core.parameters import ParameterSelection
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class RandomPointsPolygonsFixed(GeoAlgorithm):
@ -48,6 +52,9 @@ class RandomPointsPolygonsFixed(GeoAlgorithm):
STRATEGY = 'STRATEGY'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'random_points.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Random points inside polygons (fixed)')
self.group, self.i18n_group = self.trAlgorithm('Vector creation tools')

View File

@ -25,8 +25,10 @@ __copyright__ = '(C) 2014, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
import random
from PyQt4.QtCore import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import (QGis, QgsFields, QgsField, QgsFeature, QgsPoint,
QgsGeometry, QgsSpatialIndex, QgsDistanceArea)
@ -40,6 +42,8 @@ from processing.core.parameters import ParameterSelection
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class RandomPointsPolygonsVariable(GeoAlgorithm):
@ -49,6 +53,9 @@ class RandomPointsPolygonsVariable(GeoAlgorithm):
STRATEGY = 'STRATEGY'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'random_points.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Random points inside polygons (variable)')
self.group, self.i18n_group = self.trAlgorithm('Vector creation tools')

View File

@ -25,8 +25,11 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
import random
from PyQt4.QtGui import QIcon
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import ParameterSelection
@ -35,6 +38,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputVector
from processing.tools import dataobjects
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class RandomSelection(GeoAlgorithm):
@ -43,6 +48,9 @@ class RandomSelection(GeoAlgorithm):
METHOD = 'METHOD'
NUMBER = 'NUMBER'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'random_selection.png'))
def defineCharacteristics(self):
self.allowOnlyOpenedLayers = True
self.name, self.i18n_name = self.trAlgorithm('Random selection')

View File

@ -25,8 +25,13 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
import random
from PyQt4.QtGui import QIcon
from qgis.core import QgsFeature
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import ParameterSelection
@ -36,6 +41,8 @@ from processing.core.parameters import ParameterTableField
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class RandomSelectionWithinSubsets(GeoAlgorithm):
@ -45,6 +52,9 @@ class RandomSelectionWithinSubsets(GeoAlgorithm):
FIELD = 'FIELD'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'sub_selection.png'))
def defineCharacteristics(self):
self.allowOnlyOpenedLayers = True
self.name, self.i18n_name = self.trAlgorithm('Random selection within subsets')

View File

@ -25,9 +25,11 @@ __copyright__ = '(C) 2014, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
from random import seed, uniform
from math import sqrt
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import (QGis, QgsRectangle, QgsFields, QgsField, QgsFeature,
QgsGeometry, QgsPoint)
@ -39,6 +41,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.parameters import ParameterBoolean
from processing.core.outputs import OutputVector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class RegularPoints(GeoAlgorithm):
@ -49,6 +53,9 @@ class RegularPoints(GeoAlgorithm):
IS_SPACING = 'IS_SPACING'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'regular_points.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Regular points')
self.group, self.i18n_group = self.trAlgorithm('Vector creation tools')

View File

@ -25,7 +25,12 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsGeometry, QgsFeatureRequest
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterSelection
from processing.core.parameters import ParameterVector
@ -34,6 +39,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class SelectByLocation(GeoAlgorithm):
@ -44,6 +51,9 @@ class SelectByLocation(GeoAlgorithm):
METHOD = 'METHOD'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'select_location.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Select by location')
self.group, self.i18n_group = self.trAlgorithm('Vector selection tools')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsFeature, QgsGeometry
from processing.core.GeoAlgorithm import GeoAlgorithm
@ -34,6 +38,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class SimplifyGeometries(GeoAlgorithm):
@ -41,6 +47,9 @@ class SimplifyGeometries(GeoAlgorithm):
TOLERANCE = 'TOLERANCE'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'simplify.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Simplify geometries')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')

View File

@ -25,7 +25,12 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsFeature, QgsGeometry
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import ParameterVector
@ -33,6 +38,8 @@ from processing.core.parameters import ParameterTableField
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class SinglePartsToMultiparts(GeoAlgorithm):
@ -40,6 +47,9 @@ class SinglePartsToMultiparts(GeoAlgorithm):
FIELD = 'FIELD'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'single_to_multi.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Singleparts to multipart')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')

View File

@ -20,10 +20,16 @@
__author__ = 'Joshua Arnott'
__date__ = 'October 2013'
__copyright__ = '(C) 2013, Joshua Arnott'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import QGis, QgsFields, QgsField, QgsFeature, QgsGeometry, NULL
from processing.core.GeoAlgorithm import GeoAlgorithm
@ -35,6 +41,8 @@ from processing.core.parameters import ParameterString
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class SpatialJoin(GeoAlgorithm):
TARGET = "TARGET"
@ -46,6 +54,9 @@ class SpatialJoin(GeoAlgorithm):
KEEP = "KEEP"
OUTPUT = "OUTPUT"
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'join_location.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Join attributes by location')
self.group, self.i18n_group = self.trAlgorithm('Vector general tools')

View File

@ -25,13 +25,20 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QgsFeature, QgsGeometry, QgsFeatureRequest, QgsDistanceArea
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterString
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class SumLines(GeoAlgorithm):
@ -41,6 +48,9 @@ class SumLines(GeoAlgorithm):
COUNT_FIELD = 'COUNT_FIELD'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'sum_lines.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Sum line lengths')
self.group, self.i18n_group = self.trAlgorithm('Vector analysis tools')

View File

@ -25,7 +25,11 @@ __copyright__ = '(C) 2014, Alexander Bruy'
__revision__ = '$Format:%H$'
from qgis.core import QGis, QgsFeature, QgsGeometry, QgsFeatureRequest, NULL
import os
from PyQt4.QtGui import QIcon
from qgis.core import QgsFeature, QgsGeometry, QgsFeatureRequest, NULL
from processing.core.ProcessingLog import ProcessingLog
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
@ -33,6 +37,8 @@ from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
QGis.WKBMultiPolygon25D]
@ -44,6 +50,9 @@ class SymmetricalDifference(GeoAlgorithm):
OVERLAY = 'OVERLAY'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'sym_difference.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Symmetrical difference')
self.group, self.i18n_group = self.trAlgorithm('Vector overlay tools')

View File

@ -25,7 +25,12 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsFeatureRequest, QgsFeature, QgsGeometry, QgsWKBTypes
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.ProcessingLog import ProcessingLog
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
@ -33,6 +38,8 @@ from processing.core.parameters import ParameterVector
from processing.core.outputs import OutputVector
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
wkbTypeGroups = {
'Point': (QGis.WKBPoint, QGis.WKBMultiPoint, QGis.WKBPoint25D, QGis.WKBMultiPoint25D,),
'LineString': (QGis.WKBLineString, QGis.WKBMultiLineString, QGis.WKBLineString25D, QGis.WKBMultiLineString25D,),
@ -53,6 +60,9 @@ class Union(GeoAlgorithm):
INPUT2 = 'INPUT2'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'union.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Union')
self.group, self.i18n_group = self.trAlgorithm('Vector overlay tools')

View File

@ -25,7 +25,11 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
import codecs
from PyQt4.QtGui import QIcon
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterTableField
@ -34,6 +38,8 @@ from processing.core.outputs import OutputNumber
from processing.core.outputs import OutputString
from processing.tools import dataobjects, vector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class UniqueValues(GeoAlgorithm):
@ -43,6 +49,9 @@ class UniqueValues(GeoAlgorithm):
UNIQUE_VALUES = 'UNIQUE_VALUES'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'unique.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('List unique values')
self.group, self.i18n_group = self.trAlgorithm('Vector table tools')

View File

@ -25,6 +25,10 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from qgis.core import QGis
from processing.core.GeoAlgorithm import GeoAlgorithm
@ -36,6 +40,8 @@ from processing.core.outputs import OutputVector
import Buffer as buff
from processing.tools import dataobjects
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class VariableDistanceBuffer(GeoAlgorithm):
@ -45,6 +51,9 @@ class VariableDistanceBuffer(GeoAlgorithm):
SEGMENTS = 'SEGMENTS'
DISSOLVE = 'DISSOLVE'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'buffer.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Variable distance buffer')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')

View File

@ -25,9 +25,12 @@ __copyright__ = '(C) 2014, Alexander Bruy'
__revision__ = '$Format:%H$'
import os
import math
from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QVariant
from qgis.core import QGis, QgsRectangle, QgsFields, QgsField, QgsFeature, QgsGeometry, QgsPoint
from qgis.utils import iface
@ -37,6 +40,8 @@ from processing.core.parameters import ParameterNumber
from processing.core.parameters import ParameterSelection
from processing.core.outputs import OutputVector
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class VectorGrid(GeoAlgorithm):
@ -46,6 +51,9 @@ class VectorGrid(GeoAlgorithm):
TYPE = 'TYPE'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'vector_grid.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Vector grid')
self.group, self.i18n_group = self.trAlgorithm('Vector creation tools')

View File

@ -27,6 +27,8 @@ __revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import QIcon
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterTableField
@ -34,6 +36,8 @@ from processing.core.outputs import OutputDirectory
from processing.tools import dataobjects, vector
from processing.tools.system import mkdir
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class VectorSplit(GeoAlgorithm):
@ -41,6 +45,9 @@ class VectorSplit(GeoAlgorithm):
FIELD = 'FIELD'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'split_layer.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Split vector layer')
self.group, self.i18n_group = self.trAlgorithm('Vector general tools')

View File

@ -25,8 +25,11 @@ __copyright__ = '(C) 2012, Victor Olaya'
__revision__ = '$Format:%H$'
import os
from sets import Set
from PyQt4.QtGui import QIcon
from qgis.core import QGis, QgsFeatureRequest, QgsFeature, QgsGeometry, QgsPoint
from processing.core.GeoAlgorithm import GeoAlgorithm
@ -34,9 +37,12 @@ from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecution
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputVector
import voronoi
from processing.tools import dataobjects, vector
import voronoi
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class VoronoiPolygons(GeoAlgorithm):
@ -44,6 +50,9 @@ class VoronoiPolygons(GeoAlgorithm):
BUFFER = 'BUFFER'
OUTPUT = 'OUTPUT'
def getIcon(self):
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'voronoi.png'))
def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Voronoi polygons')
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')

View File

@ -1,3 +1,6 @@
FILE(GLOB IMAGE_FILES *.png *.gif)
ADD_SUBDIRECTORY(ftools)
ADD_SUBDIRECTORY(gdaltools)
PLUGIN_INSTALL(processing ./images ${IMAGE_FILES})

View File

@ -0,0 +1,3 @@
FILE(GLOB IMAGE_FILES *.png)
PLUGIN_INSTALL(processing ./images/ftools ${IMAGE_FILES})

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Some files were not shown because too many files have changed in this diff Show More