@@ -206,8 +206,8 @@ def runFinishedFromThread( self, success ):
206206 self .cancel_close .setText ( "Close" )
207207 QObject .disconnect ( self .cancel_close , SIGNAL ( "clicked()" ), self .cancelThread )
208208 if success :
209- addToTOC = QMessageBox .question ( self , self .tr ("Geometry" ),
210- self .tr ( "Created output shapefile:\n %1\n %2\n \n Would you like to add the new layer to the TOC?" ).arg ( unicode ( self .shapefileName ) ).arg ( extra ),
209+ addToTOC = QMessageBox .question ( self , self .tr ("Geometry" ),
210+ self .tr ( "Created output shapefile:\n %1\n %2\n \n Would you like to add the new layer to the TOC?" ).arg ( unicode ( self .shapefileName ) ).arg ( extra ),
211211 QMessageBox .Yes , QMessageBox .No , QMessageBox .NoButton )
212212 if addToTOC == QMessageBox .Yes :
213213 if not ftools_utils .addShapeToCanvas ( unicode ( self .shapefileName ) ):
@@ -603,7 +603,7 @@ def voronoi_polygons( self ):
603603 del writer
604604 return True
605605
606-
606+
607607 def clip_voronoi (self , edges , c , width , height , extent , exX , exY ):
608608 """ Clip voronoi function based on code written for Inkscape
609609 Copyright (C) 2010 Alvin Penner, penner@vaxxine.com
@@ -696,7 +696,7 @@ def clip_line(x1, y1, x2, y2, w, h, x, y):
696696 if hasYMin :
697697 lines .append (QgsPoint (width + extent .xMinimum ()+ exX , extent .yMinimum ()- exY ))
698698 return lines
699-
699+
700700 def layer_extent ( self ):
701701 self .emit ( SIGNAL ( "runStatus(PyQt_PyObject)" ), 0 )
702702 self .emit ( SIGNAL ( "runRange(PyQt_PyObject)" ), ( 0 , 0 ) )
@@ -713,7 +713,7 @@ def layer_extent( self ):
713713 9 : QgsField ( "WIDTH" , QVariant .Double ) }
714714
715715 writer = QgsVectorFileWriter ( self .myName , self .myEncoding ,
716- fields , QGis .WKBPolygon , self .vlayer .srs () )
716+ fields , QGis .WKBPolygon , self .vlayer .crs () )
717717 rect = self .vlayer .extent ()
718718 minx = rect .xMinimum ()
719719 miny = rect .yMinimum ()
@@ -858,13 +858,13 @@ def remove_bad_lines( self, lines ):
858858
859859 def singleToMultiGeom (self , wkbType ):
860860 try :
861- if wkbType in (QGis .WKBPoint , QGis .WKBMultiPoint ,
861+ if wkbType in (QGis .WKBPoint , QGis .WKBMultiPoint ,
862862 QGis .WKBPoint25D , QGis .WKBMultiPoint25D ):
863863 return QGis .WKBMultiPoint
864864 elif wkbType in (QGis .WKBLineString , QGis .WKBMultiLineString ,
865865 QGis .WKBMultiLineString25D , QGis .WKBLineString25D ):
866866 return QGis .WKBMultiLineString
867- elif wkbType in (QGis .WKBPolygon , QGis .WKBMultiPolygon ,
867+ elif wkbType in (QGis .WKBPolygon , QGis .WKBMultiPolygon ,
868868 QGis .WKBMultiPolygon25D , QGis .WKBPolygon25D ):
869869 return QGis .WKBMultiPolygon
870870 else :
0 commit comments