How to make crs transformation of a QgsVectorLayer?

المشرف العام

Administrator
طاقم الإدارة
I need to transform QgsVectorLayers in python from one crs into another crs. By googling I found the following solution (https://qgis.readthedocs.org/en/latest/docs/pyqgis_developer_cookbook/05_crs.html), which works for points only:

crsSrc = QgsCoordinateReferenceSystem(4326) # WGS 84crsDest = QgsCoordinateReferenceSystem(32633) # WGS 84 / UTM zone 33Nxform = QgsCoordinateTransform(crsSrc, crsDest)pt1 = xform.transform(QgsPoint(18,5))Is there a way to make a crs transformation of an entire layer?



أكثر...
 
أعلى