Skip to content
Permalink
Browse files

move ftools utils to tools utils module

  • Loading branch information
volaya committed Sep 11, 2013
1 parent c02c28b commit 6d506d6a33b0c9e79107f7aab25986b7c779b337
Showing with 172 additions and 285 deletions.
  1. +1 −7 python/plugins/processing/algs/ftools/BasicStatisticsNumbers.py
  2. +1 −7 python/plugins/processing/algs/ftools/BasicStatisticsStrings.py
  3. +3 −8 python/plugins/processing/algs/ftools/Clip.py
  4. +1 −7 python/plugins/processing/algs/ftools/ConvexHull.py
  5. +2 −7 python/plugins/processing/algs/ftools/Difference.py
  6. +1 −2 python/plugins/processing/algs/ftools/Dissolve.py
  7. +1 −6 python/plugins/processing/algs/ftools/ExportGeometryInfo.py
  8. +1 −3 python/plugins/processing/algs/ftools/ExtractNodes.py
  9. +0 −160 python/plugins/processing/algs/ftools/FToolsUtils.py
  10. +3 −4 python/plugins/processing/algs/ftools/Intersection.py
  11. +2 −2 python/plugins/processing/algs/ftools/LinesIntersection.py
  12. +1 −1 python/plugins/processing/algs/ftools/MeanCoords.py
  13. +2 −2 python/plugins/processing/algs/ftools/NearestNeighbourAnalysis.py
  14. +7 −18 python/plugins/processing/algs/ftools/PointDistance.py
  15. +2 −8 python/plugins/processing/algs/ftools/PointsInPolygon.py
  16. +2 −8 python/plugins/processing/algs/ftools/PointsInPolygonUnique.py
  17. +2 −8 python/plugins/processing/algs/ftools/PointsInPolygonWeighted.py
  18. +1 −1 python/plugins/processing/algs/ftools/RandomSelectionWithinSubsets.py
  19. +2 −4 python/plugins/processing/algs/ftools/SelectByLocation.py
  20. +1 −2 python/plugins/processing/algs/ftools/SinglePartsToMultiparts.py
  21. +2 −9 python/plugins/processing/algs/ftools/SumLines.py
  22. +3 −3 python/plugins/processing/algs/ftools/Union.py
  23. +1 −5 python/plugins/processing/algs/ftools/UniqueValues.py
  24. +1 −1 python/plugins/processing/core/LayerExporter.py
  25. +0 −1 python/plugins/processing/script/scripts/Number_of_unique_values_in_classes.py
  26. +129 −1 python/plugins/processing/tools/vector.py
@@ -26,19 +26,14 @@
import math

from PyQt4.QtCore import *

from qgis.core import *

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.QGisLayers import QGisLayers

from processing.parameters.ParameterVector import ParameterVector
from processing.parameters.ParameterTableField import ParameterTableField

from processing.outputs.OutputHTML import OutputHTML
from processing.outputs.OutputNumber import OutputNumber

from processing.algs.ftools import FToolsUtils as utils
from processing.tools import vector as utils

class BasicStatisticsNumbers(GeoAlgorithm):

@@ -57,7 +52,6 @@ class BasicStatisticsNumbers(GeoAlgorithm):
MEDIAN = "MEDIAN"
UNIQUE = "UNIQUE"


#===========================================================================
# def getIcon(self):
# return QtGui.QIcon(os.path.dirname(__file__) + "/icons/basic_statistics.png")
@@ -26,20 +26,14 @@
import codecs

from PyQt4.QtCore import *

from qgis.core import *

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.QGisLayers import QGisLayers

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

from processing.outputs.OutputHTML import OutputHTML
from processing.outputs.OutputNumber import OutputNumber

from processing.algs.ftools import FToolsUtils as utils
from processing.tools import vector as utils

class BasicStatisticsStrings(GeoAlgorithm):

@@ -24,18 +24,13 @@
__revision__ = '$Format:%H$'

from PyQt4.QtCore import *

from qgis.core import *

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.QGisLayers import QGisLayers
from processing.core.ProcessingLog import ProcessingLog

from processing.parameters.ParameterVector import ParameterVector

from processing.outputs.OutputVector import OutputVector

from processing.algs.ftools import FToolsUtils as utils
from processing.tools import vector as utils

class Clip(GeoAlgorithm):

@@ -69,7 +64,7 @@ def processAlgorithm(self, progress):
inFeatB = QgsFeature()
outFeat = QgsFeature()

index = utils.createSpatialIndex(layerB)
index = utils.spatialindex(layerB)

selectionA = QGisLayers.features(layerA)

@@ -113,7 +108,7 @@ def processAlgorithm(self, progress):
outFeat.setAttributes(attrs)
writer.addFeature(outFeat)
except:
FEAT_EXCEPT = False
FEATURE_EXCEPT = False
continue
except:
GEOS_EXCEPT = False
@@ -26,20 +26,14 @@

from PyQt4.QtCore import *
from PyQt4.QtGui import *

from qgis.core import *

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.QGisLayers import QGisLayers
from processing.core.ProcessingLog import ProcessingLog

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

from processing.outputs.OutputVector import OutputVector

from processing.algs.ftools import FToolsUtils as utils
from processing.tools import vector as utils

class ConvexHull(GeoAlgorithm):

@@ -23,18 +23,13 @@
__revision__ = '$Format:%H$'

from PyQt4.QtCore import *

from qgis.core import *

from processing.core.QGisLayers import QGisLayers
from processing.core.ProcessingLog import ProcessingLog
from processing.core.GeoAlgorithm import GeoAlgorithm

from processing.parameters.ParameterVector import ParameterVector

from processing.outputs.OutputVector import OutputVector

from processing.algs.ftools import FToolsUtils as utils
from processing.tools import vector as utils

class Difference(GeoAlgorithm):

@@ -69,7 +64,7 @@ def processAlgorithm(self, progress):
inFeatB = QgsFeature()
outFeat = QgsFeature()

index = utils.createSpatialIndex(layerB)
index = utils.spatialindex(layerB)

selectionA = QGisLayers.features(layerA)

@@ -28,13 +28,12 @@
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from processing.algs.ftools import FToolsUtils as utils
from processing.tools import vector as utils
from processing.parameters.ParameterVector import ParameterVector
from processing.core.QGisLayers import QGisLayers
from processing.outputs.OutputVector import OutputVector
from processing.parameters.ParameterBoolean import ParameterBoolean
from processing.parameters.ParameterTableField import ParameterTableField
from processing.core.ProcessingLog import ProcessingLog

class Dissolve(GeoAlgorithm):

@@ -24,18 +24,13 @@
__revision__ = '$Format:%H$'

from PyQt4.QtCore import *

from qgis.core import *

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.QGisLayers import QGisLayers

from processing.parameters.ParameterVector import ParameterVector
from processing.parameters.ParameterSelection import ParameterSelection

from processing.outputs.OutputVector import OutputVector

from processing.algs.ftools import FToolsUtils as utils
from processing.tools import vector as utils

class ExportGeometryInfo(GeoAlgorithm):

@@ -25,13 +25,11 @@

from PyQt4.QtCore import *
from qgis.core import *

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.QGisLayers import QGisLayers
from processing.parameters.ParameterVector import ParameterVector
from processing.outputs.OutputVector import OutputVector

from processing.algs.ftools import FToolsUtils as utils
from processing.tools import vector as utils

class ExtractNodes(GeoAlgorithm):

This file was deleted.

@@ -16,7 +16,7 @@
* *
***************************************************************************
"""
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException

__author__ = 'Victor Olaya'
__date__ = 'August 2012'
__copyright__ = '(C) 2012, Victor Olaya'
@@ -30,8 +30,7 @@
from processing.parameters.ParameterVector import ParameterVector
from processing.core.QGisLayers import QGisLayers
from processing.outputs.OutputVector import OutputVector
from processing.algs.ftools import FToolsUtils as utils
from processing.core.ProcessingLog import ProcessingLog
from processing.tools import vector as utils

class Intersection(GeoAlgorithm):

@@ -54,7 +53,7 @@ def processAlgorithm(self, progress):
inFeatA = QgsFeature()
inFeatB = QgsFeature()
outFeat = QgsFeature()
index = utils.createSpatialIndex(vlayerB)
index = utils.spatialindex(vlayerB)
nElement = 0
selectionA = QGisLayers.features(vlayerA)
nFeat = len(selectionA)
@@ -30,7 +30,7 @@
from processing.parameters.ParameterVector import ParameterVector
from processing.parameters.ParameterTableField import ParameterTableField
from processing.outputs.OutputVector import OutputVector
from processing.algs.ftools import FToolsUtils as utils
from processing.tools import vector as utils

class LinesIntersection(GeoAlgorithm):

@@ -73,7 +73,7 @@ def processAlgorithm(self, progress):
writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(fieldList,
QGis.WKBPoint, layerA.dataProvider().crs())

spatialIndex = utils.createSpatialIndex(layerB)
spatialIndex = utils.spatialindex(layerB)

inFeatA = QgsFeature()
inFeatB = QgsFeature()

0 comments on commit 6d506d6

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