So I have one layerA with CRS:4326 and I can change CRS saving it:
# This layer has crs:4346 layerA = QgsVectorLayer("layerA.sqlite", "layerA", "ogr") #New crs crs=QgsCoordinateReferenceSystem("epsg:32629") #saving layerA to layerB with new crs:32629 error = QgsVectorFileWriter.writeAsVectorFormat(layerA, "layerB.sqlite", "UTF-8", crs , "SpatiaLite")
With this code I can get a new LayerB with another CRS
I have read this: http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/crs
But I think this solution need to iterating over every feature to reproject it.
Is there any solution to reproject a layer with only one instruction (like when saving it) but without need to create a new layer ?