Skip to content
Permalink
Browse files

[processing] some code cleaning

  • Loading branch information
volaya committed Sep 21, 2013
1 parent 062e76b commit 54a960f9ecd22f2b706a78c2753e79af5d54965b
@@ -24,15 +24,11 @@
__revision__ = '$Format:%H$'

from PyQt4.QtCore import *

from qgis.core import *

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.tools import dataobjects, vector

from processing.parameters.ParameterVector import ParameterVector
from processing.parameters.ParameterBoolean import ParameterBoolean

from processing.outputs.OutputVector import OutputVector

class ExtentFromLayer(GeoAlgorithm):
@@ -36,11 +36,6 @@ class ExtractNodes(GeoAlgorithm):
INPUT = "INPUT"
OUTPUT = "OUTPUT"

#===========================================================================
# def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/extract_nodes.png")
#===========================================================================

def defineCharacteristics(self):
self.name = "Extract nodes"
self.group = "Vector geometry tools"
@@ -24,18 +24,13 @@
__revision__ = '$Format:%H$'

from PyQt4.QtCore import *

from qgis.core import *

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.tools import dataobjects

from processing.parameters.ParameterVector import ParameterVector
from processing.parameters.ParameterBoolean import ParameterBoolean
from processing.parameters.ParameterNumber import ParameterNumber

from processing.outputs.OutputVector import OutputVector

from processing.algs.ftools import Buffer as buff

class FixedDistanceBuffer(GeoAlgorithm):
@@ -38,11 +38,6 @@ class Intersection(GeoAlgorithm):
INPUT2 = "INPUT2"
OUTPUT = "OUTPUT"

#===========================================================================
# def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/intersect.png")
#===========================================================================

def processAlgorithm(self, progress):
vlayerA = dataobjects.getObjectFromUri(self.getParameterValue(Intersection.INPUT))
vlayerB = dataobjects.getObjectFromUri(self.getParameterValue(Intersection.INPUT2))
@@ -41,11 +41,6 @@ class LinesIntersection(GeoAlgorithm):

OUTPUT = "OUTPUT"

#===========================================================================
# def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/intersections.png")
#===========================================================================

def defineCharacteristics(self):
self.name = "Line intersections"
self.group = "Vector overlay tools"
@@ -36,11 +36,6 @@ class LinesToPolygons(GeoAlgorithm):
INPUT = "INPUT"
OUTPUT = "OUTPUT"

#===========================================================================
# def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/to_lines.png")
#===========================================================================

def defineCharacteristics(self):
self.name = "Lines to polygons"
self.group = "Vector geometry tools"
@@ -40,11 +40,6 @@ class MeanCoords(GeoAlgorithm):
UID = "UID"
WEIGHT = "WEIGHT"

#===========================================================================
# def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/mean.png")
#===========================================================================

def defineCharacteristics(self):
self.name = "Mean coordinate(s)"
self.group = "Vector analysis tools"
@@ -24,15 +24,11 @@
__revision__ = '$Format:%H$'

from PyQt4.QtCore import *

from qgis.core import *

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.tools import dataobjects, vector

from processing.parameters.ParameterVector import ParameterVector

from processing.outputs.OutputVector import OutputVector

class MultipartToSingleparts(GeoAlgorithm):
@@ -62,7 +62,6 @@ def handleAlgorithmResults(alg, progress, showResults = True):
dataobjects.load(out.value, name, alg.crs, RenderingStyles.getStyle(alg.commandLineName(),out.name))
except Exception, e:
wrongLayers.append(out)
#QMessageBox.critical(None, "Error", str(e))
elif isinstance(out, OutputHTML):
ProcessingResults.addResult(out.description, out.value)
htmlResults = True
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>532</width>
<height>377</height>
<width>800</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
@@ -17,7 +17,7 @@
class Ui_DlgHistory(object):
def setupUi(self, DlgHistory):
DlgHistory.setObjectName(_fromUtf8("DlgHistory"))
DlgHistory.resize(532, 377)
DlgHistory.resize(800, 500)
self.verticalLayout = QtGui.QVBoxLayout(DlgHistory)
self.verticalLayout.setSpacing(2)
self.verticalLayout.setMargin(0)

0 comments on commit 54a960f

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