3
votes
Accepted
Multiple operations within Field Calculator using the same IF statement
The closest point of a point geometry, is the point itself. Also, the distance between geometries, is the distance between their closest points.
"fid" attribute may or may not have the id ...
3
votes
Extracting or selecting only 4 digit numbers from attribute field
Use Extract by Expression with regular expressions using the function regepx_match(). Use this expression:
regexp_match ("number",'^\\d{4}$')
Explanation:
Match any occurence in the field ...
1
vote
Accepted
Calculate Field Date
An easier way might be using the Attributes pane.
You access the Attributes pane via the Edit tab in the Selection group by clicking the button labeled "Attributes". That will open the pane ...
1
vote
Calculate Field Date
So, it turns out that I was not using the datetime function in the field calculator. Hence, when I typed datetime.datetime(2022, 1, 11), Pro was able to pick the correct date that is 1/11/2022.
1
vote
Accepted
How to use 'to_dm' function in model designer?
For this instance, the answer was to have the Field Name be the resulting Field, not an existing Field. I see now there is an option 'Create New Field' that I missed.
1
vote
QGIS field calcuator expression distance between centroid and point feature of another layer
You need to operate on layer where you will want to have the results. In your case layer 1.
You will use the functions distance, closest_point, get_feature_by_id, array_to_string, overlay_nearest.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
field-calculator × 2453arcgis-desktop × 1000
qgis × 908
python-parser × 560
arcpy × 296
arcmap × 285
attribute-table × 254
python × 193
fields-attributes × 181
arcgis-pro × 126
arcgis-10.2 × 122
modelbuilder × 121
expression × 116
arcgis-10.0 × 96
arcgis-10.1 × 82
vbscript × 76
qgis-3 × 66
pyqgis × 62
error-000539 × 62
area × 59
string × 56
qgis-modeler × 55
arcgis-10.3 × 51
date × 42
shapefile × 35