Skip to main content
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
Results tagged with
Search options not deleted user 115

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")))).
PolyGeo's user avatar
  • 65.4k
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 …
PolyGeo's user avatar
  • 65.4k
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 …
PolyGeo's user avatar
  • 65.4k
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 …
PolyGeo's user avatar
  • 65.4k
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 …
PolyGeo's user avatar
  • 65.4k
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. …
PolyGeo's user avatar
  • 65.4k
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 …
PolyGeo's user avatar
  • 65.4k
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'+' …
PolyGeo's user avatar
  • 65.4k
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 …
PolyGeo's user avatar
  • 65.4k
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. …
PolyGeo's user avatar
  • 65.4k
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 …
PolyGeo's user avatar
  • 65.4k
0 votes
Accepted

Converting Angles in a File Geodatabase Table - via Field Calculator's Python

This statement: def Calculate(NearAngle): creates a variable named NearAngle but this code: if ( [NEAR_ANGLE] < 0 and [NEAR_ANGLE] > -180): [NEAR_ANGLE] = [NEAR_ANGLE] +360 return [NEAR_ …
PolyGeo's user avatar
  • 65.4k
2 votes

Selecting subsets of field to generate new field in ArcMap?

Nowadays, I would always do this using the Python Parser of the Field Calculator but in the old days there was a method that should still work. You could create and populate a table (often referred t …
PolyGeo's user avatar
  • 65.4k
1 vote

ArcGIS Field Calculator for changeable 3 fields add from table parameter at model builder an...

There is no ArcPy function named GetParameterAsFloat. You will need to use arcpy.GetParameterAsText() (or possibly arcpy.GetParameter()). Using print() statements to show what values have been passe …
PolyGeo's user avatar
  • 65.4k
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 …
PolyGeo's user avatar
  • 65.4k

1
2 3 4 5 6
15 30 50 per page