@@ -206,8 +206,8 @@ def runFinishedFromThread( self, success ):
206
206
self .cancel_close .setText ( "Close" )
207
207
QObject .disconnect ( self .cancel_close , SIGNAL ( "clicked()" ), self .cancelThread )
208
208
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 ),
211
211
QMessageBox .Yes , QMessageBox .No , QMessageBox .NoButton )
212
212
if addToTOC == QMessageBox .Yes :
213
213
if not ftools_utils .addShapeToCanvas ( unicode ( self .shapefileName ) ):
@@ -603,7 +603,7 @@ def voronoi_polygons( self ):
603
603
del writer
604
604
return True
605
605
606
-
606
+
607
607
def clip_voronoi (self , edges , c , width , height , extent , exX , exY ):
608
608
""" Clip voronoi function based on code written for Inkscape
609
609
Copyright (C) 2010 Alvin Penner, penner@vaxxine.com
@@ -696,7 +696,7 @@ def clip_line(x1, y1, x2, y2, w, h, x, y):
696
696
if hasYMin :
697
697
lines .append (QgsPoint (width + extent .xMinimum ()+ exX , extent .yMinimum ()- exY ))
698
698
return lines
699
-
699
+
700
700
def layer_extent ( self ):
701
701
self .emit ( SIGNAL ( "runStatus(PyQt_PyObject)" ), 0 )
702
702
self .emit ( SIGNAL ( "runRange(PyQt_PyObject)" ), ( 0 , 0 ) )
@@ -713,7 +713,7 @@ def layer_extent( self ):
713
713
9 : QgsField ( "WIDTH" , QVariant .Double ) }
714
714
715
715
writer = QgsVectorFileWriter ( self .myName , self .myEncoding ,
716
- fields , QGis .WKBPolygon , self .vlayer .srs () )
716
+ fields , QGis .WKBPolygon , self .vlayer .crs () )
717
717
rect = self .vlayer .extent ()
718
718
minx = rect .xMinimum ()
719
719
miny = rect .yMinimum ()
@@ -858,13 +858,13 @@ def remove_bad_lines( self, lines ):
858
858
859
859
def singleToMultiGeom (self , wkbType ):
860
860
try :
861
- if wkbType in (QGis .WKBPoint , QGis .WKBMultiPoint ,
861
+ if wkbType in (QGis .WKBPoint , QGis .WKBMultiPoint ,
862
862
QGis .WKBPoint25D , QGis .WKBMultiPoint25D ):
863
863
return QGis .WKBMultiPoint
864
864
elif wkbType in (QGis .WKBLineString , QGis .WKBMultiLineString ,
865
865
QGis .WKBMultiLineString25D , QGis .WKBLineString25D ):
866
866
return QGis .WKBMultiLineString
867
- elif wkbType in (QGis .WKBPolygon , QGis .WKBMultiPolygon ,
867
+ elif wkbType in (QGis .WKBPolygon , QGis .WKBMultiPolygon ,
868
868
QGis .WKBMultiPolygon25D , QGis .WKBPolygon25D ):
869
869
return QGis .WKBMultiPolygon
870
870
else :
0 commit comments