to a destination
Before we silently ignored these - now algorithms will automatically
push errors to the log if a feature cannot be written to a sink (no
changes to algorithms or special handling required)
Turns out editable joins rely on this situation. Instead change
the providers to warn on this occurance, and make the memory
provider alone truncate the extra attributes (since it doesn't
have an external backend or disk based format which natively
applies this truncation)
with MORE attributes than expected results in a failure
We need to flag these and not silently discard the extra
attributes resulting in loss of information -- if thisi
situation occurs there's a deeper bug present whic
needs to be addressed.
Ensure that features added to a memory provider (and returned when
fetching features from a memory provider) always have the correct
number of attributes present.
Fixes many random behavior bugs when working with memory providers.
are transparently padded out with NULL attributes to the required fields
length
Currently the behavior is inconsistent - some providers reject these
features, others pad them out, and worse -- some add them with
missing attributes (memory provider), causing ALL sorts of flow-on,
difficult to debug issues.
in model child algorithms
Prior to this change if you edited an algorithm in a model and
tried to enter a preset string for certain parameter types, this
string would get silently discarded on closing the dialog. E.g.
with a dissolve algorithm it was not possible to have a fixed
field name within the model to dissolve by.
This was caused by WidgetWrapper.comboValue returning the customData
for these manually entered values in the parameters combo box,
yet manually entered values never have custom data.
To work around this we only return the custom data if its
set for the selected item - otherwise we return the text unchanged.
In order to handle the "[not set]" options, a new static custom
data value of WidgetWrapper.NOT_SET_OPTION is added to that
comboValue can detect this and return the appropriate None value.
always add a consistent amount of attributes regardless of the
code paths taken
Some algorithms were adding features to data providers with
different number of attributes vs the layer's fields - this is
not supported and depending on the data provider will have
different (bad) results.
Since netcdf, and possibly other gdal drivers, use layer uris
of the format NETCDF:"/tmp/test.nc":var1 we can't safely
remove or reformat these quotations.
be prepared
There's cases where this happens without reflecting an invalid
expression. So we can try to prepare, but not abort if the
preparation fails.
Fixes#18103