[Qgis-developer] Get QGIS project EPSG code

PIERRE Sylvain sylvain.pierre at cg67.fr
Fri Sep 26 06:37:42 PDT 2014


Yes, I missunderstood  postgisSrid<http://qgis.org/api/2.2/classQgsCoordinateReferenceSystem.html#a3cb64f24049d50fbacffd1eece5125ee> () method which in fact return EPSG code (not sure of that but in my case postgissrid and EPSG code are equal...)


De : Denis Rouzaud [mailto:denis.rouzaud at gmail.com]
Envoyé : vendredi 26 septembre 2014 14:00
À : PIERRE Sylvain; QGIS Developer
Objet : Re: [Qgis-developer] Get QGIS project EPSG code

Then iface.mapCanvas().mapRenderer().destinationCrs() should do the job, no?

On 26.09.2014 13:53, PIERRE Sylvain wrote:
Thanks

It should works, but...
I'm working with 2.2 API and mapSettings doesn't exist for this release.
I should have to migrate my devs (for other reasons ;-)

Sylvain

De : Denis Rouzaud [mailto:denis.rouzaud at gmail.com]
Envoyé : vendredi 26 septembre 2014 13:43
À : PIERRE Sylvain; QGIS Developer
Objet : Re: [Qgis-developer] Get QGIS project EPSG code

Hi,

iface.mapCanvas().mapSettings().destinationCrs()

Cheers,

Denis
On 26.09.2014 13:31, PIERRE Sylvain wrote:
Hello,

PyQGIS question:
I just want to get EPSG code set at project level when on-the-fly reprojection is active.
I suppose it should be available in destinationCrs() properties from mapRenderer, but nothing found.

Any idea?

Thanks

Sylvain





_______________________________________________

Qgis-developer mailing list

Qgis-developer at lists.osgeo.org<mailto:Qgis-developer at lists.osgeo.org>

http://lists.osgeo.org/mailman/listinfo/qgis-developer


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140926/0cd17717/attachment-0001.html>


More information about the Qgis-developer mailing list