[QGIS-trac] Re: [Quantum GIS] #2661: QgsVectorLayer.crs not set correctly

Quantum GIS qgis at qgis.org
Sun Apr 18 09:01:30 EDT 2010


#2661: QgsVectorLayer.crs not set correctly
-----------------------------------------------------+----------------------
        Reporter:  rehakv1                           |         Owner:  nobody       
            Type:  bug                               |        Status:  new          
        Priority:  major: does not work as expected  |     Milestone:  Version 1.5.0
       Component:  Projection Support                |       Version:  1.4.0        
      Resolution:                                    |      Keywords:               
Platform_version:                                    |      Platform:  Windows      
        Must_fix:  No                                |   Status_info:  0            
-----------------------------------------------------+----------------------
Comment (by rehakv1):

 Sorry for the formating issues and for accidentally keeping my debug code
 at the end.

 This is the code I use to reproject my points:
 {{{
 renderer = self.canvas.mapRenderer()
 newpoint = renderer.layerToMapCoordinates(waypointslayer, point)
 }}}

 and I need to add this to make it work

 {{{
 srs = QgsCoordinateReferenceSystem(4326)
 waypointslayer.setCrs(srs)

 }}}

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/2661#comment:1>
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