New answers tagged field-calculator
1
vote
Field Calculator If Statement
Adjust your code with the following code block
def ifBlock(Parcel_Year_Built, Decade_Grouping):
if (Parcel_Year_Built < '1960' and Parcel_Year_Built > '0'):
return "59 and ...
1
vote
Accepted
Calculate the ratio of intersection to union in using the field calculator in QGIS
Try something like this:
with_variable(
'B',
overlay_intersects(
'PolyB layer name / id', -- set inside quotes PolyB layer name or id
$geometry
)[0],
area(intersection($...
0
votes
Script field calculation Python parser
Figured it out. I didnt need my Creata and Field_number fields anymore. Thank You.
Here's the code Below.
rec = 0
letter = "A"
def autoIncrement():
global rec, letter
pStart = 1
...
1
vote
Script field calculation Python parser
Using @Hornydd 's recommendation. You need to feed the "Creata" field into the script.
You script should read:
def autoIncrement(Creata):
creata = Creata
rec = 0
letter = "A&...
0
votes
Converting string field into date field in QGIS
Workaround-----you are unable to edit this (your error message above) until you save into a GeoPackage, per Why can't I edit attribute table imported through 'text as layer'
0
votes
Script field calculation Python parser
Firstly you are calculating into the numeric field Field_number so you would never be able to create your code as that is text. You need to be calculating into a text field. Secondly you don't pass ...
2
votes
Accepted
QGIS Overlay analysis in field calculator
Overlay_disjoint when used with the [,expression] parameter will return an array of all polygon that are disjoint from the current feature so unless a polygon intersect all other polygon it will ...
5
votes
Accepted
Converting text date to numbers date using QGIS Field Calculator
First I'd like to note that only the international date format is of type "date": yyyy-mm-dd. All other types are just representations of this date and depend e.g. on your settings about ...
4
votes
Accepted
How to replace multiple independent values using QGIS field calculator
It would be better to use a CASE statement Like so :
CASE
WHEN "land_classes"='6' THEN 'type 1'
WHEN "land_classes"='7' THEN 'type 2'
...
...
ELSE 'Not a valid land use ...
Top 50 recent answers are included
Related Tags
field-calculator × 2436arcgis-desktop × 1000
qgis × 898
python-parser × 559
arcpy × 296
arcmap × 285
attribute-table × 250
python × 193
fields-attributes × 181
arcgis-10.2 × 122
arcgis-pro × 122
modelbuilder × 120
expression × 115
arcgis-10.0 × 96
arcgis-10.1 × 82
vbscript × 76
qgis-3 × 65
pyqgis × 62
error-000539 × 62
area × 59
string × 54
qgis-modeler × 52
arcgis-10.3 × 51
date × 41
shapefile × 35