Nyall Dawson a98923507e Allow specifying a destination CRS in QgsFeatureRequest
If set, all geometries will be reprojected from their original
coordinate reference system to the destination CRS while
iterating over features.

If a CRS has been set as the destination CRS, then the filterRect
parameter should be specified in the same CRS as this destination
CRS.

Additionally, a callback function can be specified on the request
to be called if a transform exception is encountered while
iterating over features.

This is designed to make it easier for scripts and plugins to
correctly reproject layers in an efficient and robust way, instead
of having to implement lots of repeated code themselves and
potentially missing some of the important considerations which
come with reprojecting geometries & bounding boxes.

Now, if a script wants the features from a layer in a specific
CRS, they can call:

    crs = QgsCoordinateReferenceSystem('epsg:4326')
    request = QgsFeatureRequest().setDestinationCrs(crs)
    for f in layer.getFeatures(reqeuest):
        print('geometry in 4326 is {}.format(f.geometry().exportToWkt()))
2017-06-08 19:20:07 +10:00
..
2017-06-03 08:20:30 +02:00
2017-06-08 08:52:02 +02:00
2017-06-08 09:55:25 +02:00
2017-03-05 10:21:24 +01:00
2017-05-30 10:50:28 +02:00
2017-03-05 10:21:24 +01:00
2017-05-07 01:49:33 +02:00
2017-06-08 09:38:34 +02:00
2017-05-19 07:16:03 +02:00
2017-05-05 15:39:29 +02:00
2017-03-05 10:21:24 +01:00