Skip to main content
1 of 2
Germán Carrillo
  • 37k
  • 5
  • 125
  • 180

Instead of AuthId, you could use the CrsId in this way:

from qgis.gui import QgsGenericProjectionSelector

projSelector = QgsGenericProjectionSelector()
projSelector.exec_()
crsId = projSelector.selectedCrsId()

target_crs = QgsCoordinateReferenceSystem()
target_crs.createFromId( crsId, QgsCoordinateReferenceSystem.InternalCrsId )
iface.mapCanvas().setDestinationCrs( target_crs )
Germán Carrillo
  • 37k
  • 5
  • 125
  • 180