The code you posted is missing a multiplication symbol between the second radius calculation and math.pi. There is also no operator listed between 144 and !Shape.STLength()!
Assuming the rest of your calculation is correct and that the missing operator is multiplication:
You likely also ...
Please take a look at the aggregate function of the field-calculator.
In the layer properties the tab attribute form (8th from the top) you may set standard/preset values for your fields, e.g. based on field calculator formulas.
Your formula is correct and valid in QGIS, and will yield a Gaussian kernel:
However, the field you are trying to calculate needs more digits, since the exp decay you defined is very "slow" (the squared Distance is divided by 200.000.000).
Depending on the magnitude of your Distance values you will need to allocate more decimal digits when you define the ...
You can use the aggregate function in the expression editor:
aggregate( layer:= 'N_LAYER',
filter:=attribute( $currentfeature ,'FOREIGNKEY_IN_N_LAYER')=attribute( @parent ,'KEY_IN_1_LAYER'))
where you tell the aggregate ...
QGIS 3.6.2 - Noosa
This will generate a memory layer of a spatial join between the polygon layer being edited and an existing points layer. The fields to be joined can be specified with the JOIN_FIELDS option.
The function is fired when editing a shape is finished (right-click during editing). It saves the edits made (commitChanges()) and then performs the ...
This expression: max(CS1,CS2,CS3,CS4,CS5,CS6,CS7,CS8) will return highest CS value. Put that expression into a new field, let's call it max_CS. Make sure the new field has as many decimal places as your CS fields (if the CS fields have different numbers of decimal places, use the highest number).
This expression uses nested if() functions to find the name ...
You can use re module, see How to extract numbers from a string in Python?
a = "Other deciduous trees with 11- 25% impervious cover"
if 'cover' in data:
integers = [int(s) for s in re.findall(r'\b\d+\b', data)]
You haven’t posted the rest of your field calculator. But you code block looks OK. Some minor changes below may help, and you would need an expression some thing like this (assuming a field name of ‘text’):
if "cover" in C_TEXT.lower():
The last line isn’...