pyQGIS set project CRS

from qgis import core
from qgis.utils import iface
if iface.mapCanvas().mapRenderer().hasCrsTransformEnabled():
  my_crs = core.QgsCoordinateReferenceSystem(4326,core.QgsCoordinateReferenceSystem.EpsgCrsId)
  iface.mapCanvas().mapRenderer().setDestinationCrs(my_crs)

One thought on “pyQGIS set project CRS

  1. import processing
    from processing.core.Processing import Processing
    processing.runalg(‘qgis:polygonstolines”)

    error :algorithm not found
    how t solve this problem

Leave a Reply

Your email address will not be published. Required fields are marked *


6 × = six