mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
[processing] some code cleaning
This commit is contained in:
parent
062e76be00
commit
54a960f9ec
@ -24,15 +24,11 @@ __copyright__ = '(C) 2012, Victor Olaya'
|
||||
__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 @@ __copyright__ = '(C) 2012, Victor Olaya'
|
||||
__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 @@ __copyright__ = '(C) 2012, Victor Olaya'
|
||||
__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 @@ class Postprocessing:
|
||||
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 @@ except AttributeError:
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user