-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[backport queued ltr][processing] Insure that processing algorithms are not used to breach the OSMF tile usage policy on bulk download #58982
Conversation
…are not used to conduct bulk download of OSM tiles
…sed to conduct bulk download OSM tiles
…en exporting the layer to file (both via the browser panel as well as the layer tree)
if ( totalTiles > MAXIMUM_OPENSTREETMAP_TILES_FETCH ) | ||
{ | ||
// Prevent bulk downloading of tiles from openstreetmap.org as per OSMF tile usage policy | ||
feedback->pushWarning( QObject::tr( "Layer %1 will be skipped as the algorithm leads to bulk downloading behavior which is prohibited by the %2OpenStreetMap Foundation tile usage policy%3" ).arg( rasterLayer->name(), QString(), QString() ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the empty arguments used here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyalldawson , ah, that's because I was trying to avoid creating a new translation string. On master, you can see how the same string is used both with and without HTML formatting when used with pushFormattedMessage: https://github.com/qgis/QGIS/blob/master/src/analysis/processing/qgsalgorithmrasterize.cpp#L203-L204
That function isn't available in 3.34, yet I was thinking it;d be better to stick to the same untranslated string.
if ( QgsMapLayerUtils::isOpenStreetMapLayer( layer ) ) | ||
{ | ||
// Prevent bulk downloading of tiles from openstreetmap.org as per OSMF tile usage policy | ||
feedback->pushWarning( QObject::tr( "Layer %1 will be skipped as the algorithm leads to bulk downloading behavior which is prohibited by the %2OpenStreetMap Foundation tile usage policy%3" ).arg( layer->name(), QString(), QString() ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here -- why the empty static arguments?
Description
Manual backport of #58550 and #58584 -- the idea here is to backport onto LTR as many changes as we deem acceptable to insure we are a good citizen towards OSMF and their tiling service.