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 ...
Gabriel De Luca's user avatar
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 ...
Babel's user avatar
  • 67k
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 ...
GIS Chops's user avatar
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.
Arthur_Morgan's user avatar
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.
Max's user avatar
  • 31
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. ...
Mauro_F's user avatar
  • 33

Only top scored, non community-wiki answers of a minimum length are eligible