Skip to content
Permalink
Browse files
[sextante]fixed somes issues in ftools algorithms due to changes in v…
…ector API
  • Loading branch information
volaya committed Mar 23, 2013
1 parent 9f6715b commit 9465afa24cf59377fbd44d7471dc5b618e1b7acb
@@ -16,18 +16,19 @@
* *
***************************************************************************
"""
from sextante.core.QGisLayers import QGisLayers

__author__ = 'Victor Olaya'
__date__ = 'August 2012'
__copyright__ = '(C) 2012, Victor Olaya'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'


from PyQt4.QtCore import *

from qgis.core import *

from sextante.core.QGisLayers import QGisLayers
from sextante.core.SextanteLog import SextanteLog

def buffering(progress, writer, distance, field, useField, layer, dissolve, segments):
@@ -64,9 +64,10 @@ def processAlgorithm(self, progress):
geom = QgsGeometry( inFeatA.geometry() )
atMapA = inFeatA.attributes()
intersects = index.intersects( geom.boundingBox() )
for id in intersects:
vlayerB.featureAtId( int( id ), inFeatB , True)
tmpGeom = QgsGeometry( inFeatB.geometry() )
for i in intersects:
request = QgsFeatureRequest().setFilterFid(i)
inFeatB = vlayerB.getFeatures(request).next()
tmpGeom = QgsGeometry(inFeatB.geometry())
try:
if geom.intersects( tmpGeom ):
atMapB = inFeatB.attributes()
@@ -86,7 +86,8 @@ def processAlgorithm(self, progress):
else:
for id in intersects:
count += 1
vlayerB.featureAtId( int( id ), inFeatB , True)
request = QgsFeatureRequest().setFilterFid(id)
inFeatB = vlayerB.getFeatures(request).next()
atMapB = inFeatB.attributes()
tmpGeom = QgsGeometry( inFeatB.geometry() )

@@ -171,7 +172,8 @@ def processAlgorithm(self, progress):
raise GeoAlgorithmExecutionException("Feature exception while computing union")
else:
for id in intersects:
vlayerA.featureAtId( int( id ), inFeatB , True)
request = QgsFeatureRequest().setFilterFid(id)
inFeatB = vlayerA.getFeatures(request).next()
atMapB = inFeatB.attributes()
tmpGeom = QgsGeometry( inFeatB.geometry() )
try:

0 comments on commit 9465afa

Please sign in to comment.