[Qgis-developer] Trasform QgsVectorLayer proj4 to another

francescoboccacci at libero.it francescoboccacci at libero.it
Wed Dec 14 06:59:20 EST 2011


Hi to all,
i have a question for you. I have 2 vector layer that have two different 
spatial references. I'd like to tranform(convert) one of these in the same 
coordinate system.
Like that:

 crsStart = QgsCoordinateReferenceSystem()
 crsStart.createFromProj4(layerA.crs().toProj4())
 crsDest = QgsCoordinateReferenceSystem()  
 crsDest.createFromProj4(layerB.crs().toProj4())
   
  if crsStart != crsDest:
  
                    layerA = QgsCoordinateTransform(crsStart,crsDest).
transformLayerAtoLayerB
               
                    
Which is the function that i have to use?

Thanks

Francesco Boccacci




More information about the Qgis-developer mailing list