mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
Update some use of QgsCoordinateReferenceSystem
This commit is contained in:
parent
c398a2666a
commit
1eae00e07a
@ -392,7 +392,7 @@ class MetaSearchDialog(QDialog, BASE_CLASS):
|
||||
|
||||
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()))
|
||||
@ -562,7 +562,7 @@ class MetaSearchDialog(QDialog, BASE_CLASS):
|
||||
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():
|
||||
|
@ -209,7 +209,7 @@ class DlgImportVector(QDialog, Ui_Dialog):
|
||||
|
||||
srcCrs = self.inLayer.crs()
|
||||
if not srcCrs.isValid():
|
||||
srcCrs = QgsCoordinateReferenceSystem(4326)
|
||||
srcCrs = QgsCoordinateReferenceSystem("EPSG:4326")
|
||||
self.widgetSourceSrid.setCrs(srcCrs)
|
||||
self.widgetTargetSrid.setCrs(srcCrs)
|
||||
|
||||
|
@ -62,7 +62,7 @@ class TestQgsProcessingCheckValidity(unittest.TestCase):
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user