Skip to content

Commit 62e7df7

Browse files
author
alexbruy
committed
use crs() instead of deprecated srs()
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15322 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 97d366d commit 62e7df7

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

python/plugins/fTools/tools/doDefineProj.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ def accept(self):
6565
srsDefine.createFromProj4(outProj)
6666
else:
6767
destLayer = ftools_utils.getVectorLayerByName(self.cmbLayer.currentText())
68-
srsDefine = destLayer.srs()
69-
if srsDefine == vLayer.srs():
68+
srsDefine = destLayer.crs()
69+
if srsDefine == vLayer.crs():
7070
responce = QMessageBox.question(self, self.tr("Define current projection"),
7171
self.tr("Identical output spatial reference system chosen\n\nAre you sure you want to proceed?"),
7272
QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)

python/plugins/fTools/tools/doGeometry.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -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\nWould 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\nWould 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:

python/plugins/fTools/tools/doMergeShapes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def run( self ):
186186
# get information about shapefiles
187187
layerPath = QFileInfo( self.baseDir + "/" + self.shapes[ 0 ] ).absoluteFilePath()
188188
newLayer = QgsVectorLayer( layerPath, QFileInfo( layerPath ).baseName(), "ogr" )
189-
self.crs = newLayer.srs()
189+
self.crs = newLayer.crs()
190190
self.geom = newLayer.wkbType()
191191
vprovider = newLayer.dataProvider()
192192
self.fields = vprovider.fields()

0 commit comments

Comments
 (0)