Up to date it was not possible to create a function that handles NULL values with the
@qgsfunction decorator. As soon as any parameter was NULL, the return value would also
be NULL.
Example of a function that returns a value now with a NULL paramter and would have returned NULL before
```
@qgsfunction(args=-1, group='Custom', handlesnull=True)
def mean_value(vals, feature, parent):
valid_vals = [val for val in vals if val != NULL]
return sum(valid_vals)/len(valid_vals)
```
[FEATURE]
Previously the changing camera's pitch (tilting the view) would stop
when the camera view is nearly parallel with the horizon. Now it will
be also possible to look up.
Let's see how this will work - we can always switch back in case of problems.
At around ~70km distance of camera from terrain the updates of camera
view centers didn't work correctly and the whole view got locked,
unable to pan camera around until zoomed closer. The reason is that
QVector3D::unproject() has "is fuzzy zero" tolerance too high (1e-5)
and was returning incorrect vectors.
This commit also adds a routine for ray-plane intersection which
isn't used in the end, but may be useful at some point later for
simplified ray vs terrain tile tests.
Adds an acquisition interval parameter and a distance threshold
parameter to the gps plugin in order to keep the cursor still when
the receiver is in static conditions.
Prevents crashes when PyQt4 modules are imported in QGIS 3.x.
This instantly segfaults QGIS. Throwing an exception makes it
easier to identify the cause as a faulty plugin, and shows
exactly where the bad import is located.
Adds a native k-means clustering algorithm.
Based on a port of PostGIS' ST_ClusterKMeans function, this
new algorithm adds a new cluster ID field to a set of input
features identify the feature's cluster based on the k-means
clustering approach. If non-point geometries are used as input,
the clustering is based off the centroid of the input geometries.