Python - find layer projection

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Python - find layer projection

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