[Qgis-psc] Report on the grant for QEP 291
Mathieu Pellerin
nirvn.asia at gmail.com
Fri Nov 15 03:44:45 PST 2024
Greetings PSC,
I’m happy to report that the work for the above-mentioned QEP has been
completed during the months of August and September 2024. The work includes:
- A new “smart” network cache mode - enabled by default – which adopts
modern browsers’ strategies to determine the on-disk network cache size
based on users’ available space. Starting with QGIS, for the fast majority
of users, this will increase the network cache size from 0.25gb to 1gb,
which in turn will allow for greater space to cache XYZ raster tiles,
including those served by openstreetmap.org. While a backport was made
available, it was deemed – wisely :) - too risky to merge.
- The following processing algorithms were modified to insure QGIS users do
not accidentally breach the OSMF tile usage policy with regards to bulk
downloads: the generate XYZ tiles (MBTiles) algorithm, the generate XYZ
tiles (Directory) algorithm, and the convert map to raster algorithm. In
all three algorithms, a check is now in place to insure that no more than
5,000 tiles will be fetched from openstreetmap.org. If the amount of tiles
goes behind this threshold, users will be informed through a warning
message in their processing algorithm dialog that the layer serving
openstreetmap.org tiles has been removed from the set of layers being
rendered. Below 5,000 tiles, we assume users are not aimed at bulk
downloading tiles but rather preparing a map of reasonable extent for
viewing. These changes have been backported to the current 3.34 LTR.
- Additionally, further safeguards were put in place while researching
other means through which bulk downloads could be achieved. The same 5,000
tiles threshold when saving a XYZ raster layer through the browser panel as
well as through the layers panel when those tiles are served through
openstreetmap.org. As with the processing algorithms, when users surpasses
the threshold, a message box will appear to inform them of the OSMF tile
usage policy. These changes are available in 3.40 and have also been
backported to the current 3.34 LTR.
- Finally, I took the opportunity to apply an improvement to the default
OpenStreetMap XYZ layer available through the browser panel. On fresh QGIS
installations, this layer now now has its tile resolution set to 96DPI
instead of unknown. The change results in a significant reduction in tiles
being fetched when exporting a print layout in high DPI (e.g. 300). The
benefits in terms of tile fetching reduction also impacts atlas and report
layout exports. The change arguably improves layout exports by avoiding
tiny, unreadable labels. Users can always manually change this tile
resolution setting if desired. This change is available in 3.40 and has
also been backported to the current 3.34 LTR.
With those improvements in place, QGIS 3.40 has the safeguards in place to
insure that bulk downloads - accidental or intentional - are prohibited.
Furthermore, the network caching improvement and the adjusted configuration
of the default OpenStreetMap XYZ layer shipped with QGIS are undoubtedly
going to reduce any stress caused by normal usage’s fetching of tiles.
Regards,
Mathieu Pellerin
OPENGIS.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-psc/attachments/20241115/f50a6848/attachment.htm>
More information about the QGIS-PSC
mailing list