Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
removes print to stdout in geoprocessing module - fixes crash when py…
…thon print

to stdout on vista machines


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9991 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
cfarmer committed Jan 20, 2009
1 parent f55a844 commit f87e45e
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions python/plugins/ftools/tools/doGeoprocessing.py
Expand Up @@ -139,7 +139,6 @@ def manageGui( self ):
#8: Clip

def geoprocessing( self, myLayerA, myLayerB, myParam, myMerge ):
print "starting geoprocessing..."
self.testThread = geoprocessingThread( self.iface.mainWindow(), self, self.myFunction, myLayerA,
myLayerB, myParam, myMerge, self.shapefileName, self.encoding )
QObject.connect( self.testThread, SIGNAL( "runFinished(PyQt_PyObject)" ), self.runFinishedFromThread )
Expand All @@ -148,7 +147,6 @@ def geoprocessing( self, myLayerA, myLayerB, myParam, myMerge ):
self.cancel_close.setText( "Cancel" )
QObject.connect( self.cancel_close, SIGNAL( "clicked()" ), self.cancelThread )
self.testThread.start()
print "\n"
return True

def cancelThread( self ):
Expand Down Expand Up @@ -239,8 +237,6 @@ def buffering( self, useField ):
while vproviderA.nextFeature( inFeat ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
print '%s\r' % ''*20,
print '%d%%' % int( float( nElement ) / float( nFeat ) * 100.00 ),
atMap = inFeat.attributeMap()
if useField:
value = atMap[ self.myParam ].toDouble()[ 0 ]
Expand All @@ -260,8 +256,6 @@ def buffering( self, useField ):
while vproviderA.nextFeature( inFeat ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
print '%s\r' % ''*20,
print '%d%%' % int( float( nElement ) / float( nFeat ) * 100.00 ),
atMap = inFeat.attributeMap()
if useField:
value = atMap[ self.myParam ].toDouble()[ 0 ]
Expand Down Expand Up @@ -300,8 +294,6 @@ def convex_hull(self, useField ):
while vproviderA.nextFeature( inFeat ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
print '%s\r' % ''*20,
print '%d%%' % int( float( nElement ) / float( nFeat ) * 100.00 ),
atMap = inFeat.attributeMap()
idVar = atMap[ self.myParam ]
if idVar.toString().trimmed() == i.toString().trimmed():
Expand Down Expand Up @@ -329,8 +321,6 @@ def convex_hull(self, useField ):
while vproviderA.nextFeature( inFeat ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
print '%s\r' % ''*20,
print '%d%%' % int( float( nElement ) / float( nFeat ) * 100.00 ),
inGeom = inFeat.geometry()
points = ftools_utils.extractPoints( inGeom )
hull.extend( points )
Expand Down Expand Up @@ -366,8 +356,6 @@ def dissolve( self, useField ):
while vproviderA.nextFeature( inFeat ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
print '%s\r' % ''*20,
print '%d%%' % int( float( nElement ) / float( nFeat ) * 100.00 ),
if not useField:
if first:
attrs = inFeat.attributeMap()
Expand Down Expand Up @@ -411,8 +399,6 @@ def difference( self ):
while vproviderA.nextFeature( inFeatA ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
print '%s\r' % ''*20,
print '%d%%' % int( float( nElement ) / float( nFeat ) * 100.00 ),
geom = inFeatA.geometry()
atMap = inFeatA.attributeMap()
intersects = index.intersects( geom.boundingBox() )
Expand Down Expand Up @@ -449,8 +435,6 @@ def intersect( self ):
while vproviderA.nextFeature( inFeatA ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
print '%s\r' % ''*20,
print '%d%%' % int( float( nElement ) / float( nFeat ) * 100.00 ),
geom = inFeatA.geometry()
atMapA = inFeatA.attributeMap()
intersects = index.intersects( geom.boundingBox() )
Expand Down Expand Up @@ -490,7 +474,6 @@ def union( self ):
while vproviderA.nextFeature( inFeatA ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
print int( float( nElement ) / float( nFeat ) * 100.00 )
found = False
geom = QgsGeometry( inFeatA.geometry() )
diffGeom = QgsGeometry( inFeatA.geometry() )
Expand Down Expand Up @@ -520,7 +503,6 @@ def union( self ):
while vproviderB.nextFeature( inFeatA ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
print int( float( nElement ) / float( nFeat ) * 100.00 ),
geom = QgsGeometry( inFeatA.geometry() )
atMap = inFeatA.attributeMap().values()
atMap = dict( zip( range( length, length + len( atMap ) ), atMap ) )
Expand Down Expand Up @@ -565,8 +547,6 @@ def symetrical_difference( self ):
while vproviderA.nextFeature( inFeatA ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
print '%s\r' % ''*20,
print '%d%%' % int( float( nElement ) / float( nFeat ) * 100.00 ),
geom = inFeatA.geometry()
atMapA = inFeatA.attributeMap()
intersects = indexA.intersects( geom.boundingBox() )
Expand All @@ -582,8 +562,6 @@ def symetrical_difference( self ):
while vproviderB.nextFeature( inFeatA ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
print '%s\r' % ''*20,
print '%d%%' % int( float( nElement ) / float( nFeat ) * 100.00 ),
geom = inFeatA.geometry()
atMap = inFeatA.attributeMap().values()
atMap = dict( zip( range( length, length + len( atMap ) ), atMap ) )
Expand Down Expand Up @@ -622,8 +600,6 @@ def clip( self ):
while vproviderA.nextFeature( inFeatA ):
nElement += 1
self.emit( SIGNAL( "runStatus(PyQt_PyObject)" ), nElement )
print '%s\r' % ''*20,
print '%d%%' % int( float( nElement ) / float( nFeat ) * 100.00 ),
geom = inFeatA.geometry()
atMap = inFeatA.attributeMap()
intersects = index.intersects( geom.boundingBox() )
Expand Down

0 comments on commit f87e45e

Please sign in to comment.