Python - find layer projection

1 message Options
Embed this post
Permalink
piko

Python - find layer projection

Reply Threaded More More options
Print post
Permalink
Hi List

I got troubles working on projections
I'd like to detect the projection of OGR loaded layers, to do some CoordinateTransform after
I going on the QgsSpatialRefSys() class, trying to use epsg() , srsid()... but in vain
I also had a look to the srsmangement plugin, and it helps, but i want the proj being detected automatically, not by calling the ProjectionSector Qgis widget.

Has anybody got an idea ? How can i use SpatialRefSys properly to ger the layer's epsg or other ?
ANy example ??

Thanks by advance

PikO