Hi

canvas = self.iface.mapCanvas()
mapRenderer = canvas.mapRenderer()
srs=mapRenderer.destinationCrs()

Then for example
str(srs.authid())
would return for a project in WGS84:
‘EPSG:4326’

Cheers
Stefan

From: [email protected] 
[mailto:[email protected]] On Behalf Of Ricardo Filipe 
Soares Garcia da
Sent: 29. mai 2013 12:02
To: [email protected]
Subject: [Qgis-developer] How to get project's CRS in Python

Hi list
How could I extract the current project's CRS from python?
I've tried looking for it in QSettings but came up short. Mybe somewhere in 
QgsProject? I can't figure out how to use the readListEntry() method though.
Thanks

--
___________________________ ___ __
Ricardo Garcia Silva
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to