Many APIs such as overpass turbo require bounding box notation like (x_max, y_max, y_min, x_min)
in EPSG:4326.
However the method QgsVectorLayer.extent()
returns values in the source's CRS. A possible solution of course is to reproject the QgsRectangle
as described here long time ago. But I wonder:
Is there a way to easily return these coordinates in EPSG:4326 without having to reproject all the data i want to derive extents from?
I mean Qgis nativliy derives these coordinates when using the 'Identify Features' tool and also by glancing at the sourcecode of the the plugin 'QickOSM' it seems capable of doing so.