Questions tagged [qgis-custom-function]
Use this tag for topics related to custom functions, which are user-defined expression functions usable from the Field Calculator in QGIS.
99 questions
5
votes
0
answers
62
views
Displaying help on arguments, that should be entered next in QGIS custom function
When typing the name of a function, a helper is displayed with the arguments that must be entered next.
How can I do this for a custom function?
4
votes
1
answer
173
views
HTML MapTip to show elevation data from DEM layer in QGIS
Is there a way to set the HTML MapTip to show elevation data on a DEM layer in QGIS?
The QGIS expression builder doesn't have any functionality to connect to mouse movement. I am guessing a custom ...
2
votes
1
answer
54
views
Self-referencing objects inside functions on print composer
I'm writing a function to display different intervals on a map grid depending on its scale, something like this:
This function is applied to and references the map called "Mapa_principal_R."...
1
vote
1
answer
67
views
Rule-Based Symbology associated with numerous fields at once
I hope that my picture explains my goal here in regards to rule-based symbology for the layer I'm creating.
I want to have rule-based symbology based off the functions listed in the image on the left, ...
3
votes
1
answer
119
views
Using string output of custom function with rule-based symbology in QGIS
I want to use the following custom function in a ruled-based symbology of a layer to filter features by the names of visible layers within another layer group:
@qgsfunction(args='auto', group='Custom')...
3
votes
1
answer
1k
views
QGIS Attribute Form -> Value Relation -> Filter expression: expressions or functions to get the names of current layer and current field
Shortcut to the core question:
How to write a custom function to get the name of a field in an Attribute Form?
I would like to use it as a variable in a Filter expression of a field with a Value ...
1
vote
0
answers
73
views
Representing buffer (e.g., +/-10%) around object and displaying predefined "straight" scale in object's representation
I am working on a mapping project in QGIS with the Atlas feature, and I'm facing a specific challenge. I need to generate map representations of individual features in a way that includes a dynamic ...
1
vote
0
answers
205
views
Highlighting local maxima of an attribute in a layer in QGIS
I have two layers from the same track measured at a different time, and would like to highlight where they have moved the most.
I can use closet point function to work out regular separations along ...
1
vote
0
answers
93
views
Othogonal Dimensions in QGIS
Is there is a solution for Orthogonal Dimensions in QGIS?
At the moment i have to export my projects to AutoCAD and make the dimensioning process there. As i could fully change my workflow to QGIS ...
9
votes
1
answer
308
views
"'QgsPyExpressionFunction' object is not callable" when using custom function within QgsPyExpressionFunctions in PyQGIS
I created a function force_numeric_list in my QGIS Expression "Function Editor" (see image below) to reuse it in other functions there, e.g. as shown below in the function ...
3
votes
1
answer
74
views
QGIS Extract by Expression - Only subgroups w/ time duration between consecutive observations < 4h
I have several point layers with the attributes CLUSTER_ID (groups points in different clusters by unique ID) and datetime_lcl (timestamps). In each layer, I'd like to extract only the clusters in ...
0
votes
0
answers
246
views
Python code location for QGIS functions
Is the Python Code accessible for QGIS function definitions?
My knowledge of Python is limited but I have had success tweaking code in Ruby. So I am willing to give it a try but would like to see the ...
3
votes
1
answer
99
views
Select text field associated with maximum numeric field during QGIS aggregate process
I have a site layer and a grid layer and want to add attributes to the site layer which include a new area (the intersection) and the grid reference (a text field) associated with the maximum ...
1
vote
0
answers
171
views
QGIS: Hashed lined - advanced symbology and styling. 90*degree cornering and flexible widths
TL;DR: How do i set up a symbology with hashed lines, that is not turning fluently around corners, but turns sharply at a 90 degree angle and stops overlapping. The corners are for all purposes close ...
1
vote
0
answers
54
views
QGIS 3.22 Labeling Previews show expected result, but is not shown on canvas
I created a function to label rasters whose boundaries are the same but represent different features. To do so, I have a set of rasters and a point vector layer with one field representing each of ...