Skip to content

Commit

Permalink
Update some use of QgsCoordinateReferenceSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored and nyalldawson committed Mar 5, 2020
1 parent c398a26 commit 1eae00e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions python/plugins/MetaSearch/dialogs/maindialog.py
Expand Up @@ -392,7 +392,7 @@ def set_bbox_from_map(self):

if crsid != 4326: # reproject to EPSG:4326
src = QgsCoordinateReferenceSystem(crsid)
dest = QgsCoordinateReferenceSystem(4326)
dest = QgsCoordinateReferenceSystem("EPSG:4326")
xform = QgsCoordinateTransform(src, dest, QgsProject.instance())
minxy = xform.transform(QgsPointXY(extent.xMinimum(),
extent.yMinimum()))
Expand Down Expand Up @@ -562,7 +562,7 @@ def record_clicked(self):
if record.bbox is not None:
points = bbox_to_polygon(record.bbox)
if points is not None:
src = QgsCoordinateReferenceSystem(4326)
src = QgsCoordinateReferenceSystem("EPSG:4326")
dst = self.map.mapSettings().destinationCrs()
geom = QgsGeometry.fromWkt(points)
if src.postgisSrid() != dst.postgisSrid():
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/db_manager/dlg_import_vector.py
Expand Up @@ -209,7 +209,7 @@ def updateInputLayer(self):

srcCrs = self.inLayer.crs()
if not srcCrs.isValid():
srcCrs = QgsCoordinateReferenceSystem(4326)
srcCrs = QgsCoordinateReferenceSystem("EPSG:4326")
self.widgetSourceSrid.setCrs(srcCrs)
self.widgetTargetSrid.setCrs(srcCrs)

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/tests/CheckValidityAlgorithm.py
Expand Up @@ -62,7 +62,7 @@ def _make_layer(self, layer_wkb_name):
wkb_type = getattr(QgsWkbTypes, layer_wkb_name)
fields.append(QgsField('int_f', QVariant.Int))
layer = QgsMemoryProviderUtils.createMemoryLayer(
'%s_layer' % layer_wkb_name, fields, wkb_type, QgsCoordinateReferenceSystem(4326))
'%s_layer' % layer_wkb_name, fields, wkb_type, QgsCoordinateReferenceSystem("EPSG:4326"))
self.assertTrue(layer.isValid())
self.assertEqual(layer.wkbType(), wkb_type)
return layer
Expand Down

0 comments on commit 1eae00e

Please sign in to comment.