And add to "Advanced Python field calculator" algorithm, as that
algorithm uses the Python exec() function and is a security
risk if run with untrusted/unchecked inputs
The older approach of storing parameters was insecure, and required
eval()ing the unchecked contents of the batch parameter file. This
is a security risk, as a malicious file could leak user information
or damage the system.
So,
- Switch to a newer ".batch" format which uses safe JSON objects
only for serializing parameter values.
- Allow loading the older .json files, but first show a warning
that they are a security risk and require to user to explicitly
agree to open the file
"forward declare" functions which will be patched when the processing
plugin starts, so that these are known and accessible during the PyQGIS
doc building. Also make these forward declared versions raise
QgsNotSupportedException, so that its clear why they aren't working
when the processing plugin hasn't started
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/38
export the layer to an OGR compatible source first
Use the same logic we use eg for auto-exporting memory layers
so that GDAL tools "just work" with GRASS provider vector
layers
The inputs we use for these run tests have open options, and now
that we are respecting these and passing them to the GDAL command
we can't run these tests on the earlier GDAL versions which
didn't support open options.
The commands generated by the corresponding algorithms are already
well tested and still run on the earlier GDAL releases, it's just
the actual run test which will be skipped.
We now pass on the FORCE_SRS_DETECTION=YES open option which we
were previously dropping, so the results for these commands is
slightly different
Also drop test for older GEOS versions, it's covered by a test
for more recent versions and we have extensive test covering
the GDAL command line for this tool anyway.
The creategrid algorithm had a limit of 0 to 1000000000.0.
I'm removing this limitation to go beyond this maximum limit, but above all to
allow a negative limit, which in fact allows an empty space
(the opposite of superposition).
If for some reason Processing configuration gets stored into configuration file,
previous code saved default menu paths in configuration. If GUI language changes,
custom values stored in the configuration take precedence over default ones
(= default translated ones are not used). This fix removes menu keys from config
for default value and thus allows to fall back to default menu items on language
switch.
Fixes#52449 (and related issues)
Adds an optional end point distance threshold parameter to the
network analysis tools. Previously (and still, by default) endpoints
will ALWAYS be snapped to the nearest point in the network layer,
regardless of how far away from the network they actually are. This
can result in meaningless results, as the tools will happily snap
points to a road hundreds of kilometers away :)
Now, there's an optional end point distance threshold parameter
for these tools. The behaviour of the threshold depends on the
algorithm:
- For the “Service area (from layer)” tool an optional new output
was added for “non routable features”. This output will contain
any features which were deemed too far from the network. All
other features which are within tolerance distance to the
network will be stored in the standard output from the tool.
- For the “Service area (from point)” tool an error will be raised
if the point is too far from the network
- For the “Shortest path (point to point)” tool an error will
be raised if either the source or destination points are too far
from the network.
- For the “Shortest path (layer to point)” and “Shortest path (point
to layer)” tools:
- An error will be raised if the **point** is too far from the network.
- A new optional output was added for “non routable features”. This
output will contain any features which were deemed too far from the
network. All other features which are within tolerance distance to
the network will be stored in the standard output from the tool.
Sponsored by City of Canning