[QGIS-trac] Re: [Quantum GIS] #1339: Can't set projection to WGS84 UTM Zone 15N

Quantum GIS qgis at qgis.org
Tue Oct 28 16:24:40 EDT 2008


#1339: Can't set projection to WGS84 UTM Zone 15N
-----------------------------------------------------+----------------------
        Reporter:  vedgewater                        |         Owner:  nobody       
            Type:  bug                               |        Status:  new          
        Priority:  major: does not work as expected  |     Milestone:  Version 1.0.0
       Component:  Projection Support                |       Version:  0.11.0       
      Resolution:                                    |      Keywords:  UTM SRSID    
Platform_version:                                    |      Platform:  Gentoo       
        Must_fix:  No                                |   Status_info:  0            
-----------------------------------------------------+----------------------
Comment (by vedgewater):

 Hello again,

 I've just realised that the code above has been strangely formatted, it's
 meant to read like


 {{{
 def getVectorLayerByName(myName):
   mc = iface.getMapCanvas()
   nLayers = mc.layerCount()
   for l in range(nLayers):
     layer = mc.getZpos(l)
     if str(layer.name()) == str(myName):
       vlayer = QgsVectorLayer(str(layer.source()),  str(myName),
 str(layer.getDataProvider().name()))
       if vlayer.isValid():
         return vlayer

 regionLayer = getVectorLayerByName("boundaryPolygons_004")

 regionLayer.srs().srsid()
 }}}

 Regards,

 Vince

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1339#comment:3>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list