Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
allows you to perform calculations on the basis of existing attribute values or defined functions in QGIS, ArcGIS, etc.
1
vote
Calculating distance between two point layers based on matching ID using QGIS
As commented by @J.Monticolo:
Just replace PID0001 by the "PID" field value :
length(shortest_line($geometry, geometry(get_feature('LandscapeAll', 'PID', "PID")))).
0
votes
Using If Statements in ArcMap Field Calculator
Esri Support provide an How To: Use IF statements in the Field Calculator:
Summary
The Field Calculator uses IF statements to calculate new values in the
field of an attribute table. This article des …
1
vote
Calculate Field gives ERROR 002717: Invalid Arcade expression, Arcade Error: Index out of bo...
At ERROR 002717: Invalid Arcade expression, Arcade error: Index out of bounds I was getting the same error message as you when using Arcade with ArcGIS Pro 3.0.2, a file geodatabase and Add Attribute …
2
votes
Assigning values to field using if/then logic involving multiple fields
Make sure that you have set your parser to Python (as suggested by @Arabella) and then try something more like this untested code:
Pre-Logic Script Code:
def selectter(Majr_src,Top_pct,Top_src,Close_s …
5
votes
Accepted
Using Calculate Field tool to calculate on null fields using ArcMap
This should do it, and also deals with any empty or space-filled strings.
Parser: Python
Pre-Logic Script Code:
def FixNull(Field1,Field2):
if Field1 is None or Field1.strip() == "":
return Fiel …
2
votes
ArcPy expression syntax in CalculateField_management
To do this I would use two Python string methods (format and zfill).
I find workflows like this much easier when approached using arcpy.da.UpdateCursor() rather than the CalculateField_management() fu …
0
votes
Python split expression to Python code
The split method you are using is from Python, and in the Field Calculator you are applying that method to the string returned from each row in the PROPR_NAME field.
I think the easiest way to get the …
1
vote
Accepted
ArcGIS Pro field calculator if - else - string error
I would try this:
import math
def muh(bedingung, wert, Shape_Area):
if (bedingung == "hallo"):
value = (4.3 * math.log(wert)) * Shape_Area
elif (bedingung == "echo"):
value = (2. …
1
vote
ArcGIS Pro calculate field using arcade not working?
To test this I used Create Fishnet to create a 3x3 grid to which I added a Text field called Barkfuelhaz and populated it as below:
I then added a Short Integer field that I named IntField and trie …
1
vote
Designing text in QGIS
As commented by @Mapperz:
On windows use cm\u00b3 m\u00b3 or km\u00b3 - In QGIS labelling you
need to convert the number field (like area) to a string like:
to_string (round(Area, 2)) ++'m'+' …
3
votes
Editing attributes of shapefile in ModelBuilder?
As commented by @MichaelStimson:
Calculate field should be what you're after.
http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000004m000000
Just select the feature(s)/row(s) th …
3
votes
Converting full road names to abbreviation using ArcGIS field calculator?
If you only want to use the abbreviations for labelling then you could investigate Using an abbreviation dictionary and the About abbreviating and truncating words page:
Abbreviation dictionaries …
2
votes
Accepted
Using File Geodatabase with Null values in Field Calculator of ArcGIS Desktop 10.0?
I just ran the test below in the Field Calculator and it seemed to work.
def stack(item1,item2,item3):
itemList = [item1,item2,item3]
myList = [item for item in itemList if (item != None)]
retu …
2
votes
Batching field calculations and feature classes in feature dataset using ArcPy?
I would not use the Field Calculator for this. Instead I would use an arcpy.da.UpdateCursor():
UpdateCursor establishes read-write access to records returned from a
feature class or table.
…
3
votes
Accepted
Updating many attributes at once in ArcGIS Field Calculator?
The Field Calculator will only update one field at a time when run through its tool dialog.
To update multiple fields you could create a tool in ModelBuilder or ArcPy that runs the Calculate Field t …