Questions tagged [field-calculator]

allows you to perform calculations on the basis of existing attribute values or defined functions in QGIS, ArcGIS, etc.

Filter by
Sorted by
Tagged with
4 votes
1 answer
96 views

What is meant by 'current feature' when using the field calculator or expression builder in QGIS?

I am curious about field calculator and expression builder language in QGIS. For example, $area returns the area of the 'current feature'. Does 'current feature' refer to all features of a shapefile ...
user avatar
  • 41
0 votes
1 answer
24 views

Using Field Calculator to put file name into field

I am using ArcGIS ModelBuilder. I want to use Field Calculator to put the file name into a field. I created a field using add field. But I don't know the function to call the file name. What I've ...
user avatar
0 votes
0 answers
11 views

Contingent values in ArcGIS Online - Need to update domain value in field based on another field value

I am trying to build a very simple calculation (or so I believe it should be) in Field Maps. I want the field, we'll call it "Calculations", to populate either "Compliant" or "...
user avatar
2 votes
1 answer
42 views

Renaming categorical attribute values in QGIS attribute table: merge two different strings to the same name

Issue I have a column called ' Species' in a shapefile layer showing the distribution of different species of dolphins. The operator that originally inputted the species names into our excel data ...
user avatar
0 votes
0 answers
15 views

Error 999999 when I try to write anything in ArcGIS field calculator? [closed]

I am trying to write text or formula but they don't work and it gives an error. However, if I try to choose something from 'fields' it works. ''824''+(( [dem]-83) *54) /200 This is my formula. (Eng ...
user avatar
  • 1
0 votes
1 answer
26 views

Automatic getting atrribute to polygons : label name of polygon that shape is inside or overlaped

I have many polygons in my merged shapefile (all in my country boundary) that I want to add them field (in attribute table) :label name of the province that contains them. Is there any way to do this?...
user avatar
  • 43
3 votes
1 answer
108 views

Using QGIS field calculator to create an 'fid' column according to a value from another column

I have a shapefile with 1,800 rows. I need to edit this file as follow: Row_name is from 1 to 45 Col is from 1 to 39 fid should be from 1 to 1800 in order (This is the new field I need to create). I ...
user avatar
2 votes
2 answers
110 views

Filling attributes in one field based on second field with same values in QGIS

How do I fill the attribute with "SID_2" of the captured image where the ID of "SID_1" is NULL? I'm using QGIS 3.22
user avatar
  • 27
4 votes
1 answer
101 views

Calculating two columns at once in QGIS

Is it possible to calculate two columns at once? So what I mean is that we have different covers and lengths and I want a total length of "Cover A" after that a total length of cover tb and ...
user avatar
  • 41
0 votes
0 answers
36 views

How to add Height to specific coordinates in meter in the attribute table in QGIS 3.22.4

I would like to add the height/elevation of a specific topographic point into my attribute table. I calculate x- and y- coordinates as well as the dms-coordinates in the field calculator by code and ...
user avatar
  • 1
0 votes
1 answer
25 views

Adding function to Helpers list in ArcGIS Pro Field Calculator

I'm using ArcGIS Pro 2.8 and would like to add a Function to the Helpers list in the Field Calculator. Is this possible?
user avatar
  • 1
1 vote
0 answers
31 views

Qgis 3.22.6: Field calculator in model gives back null values [duplicate]

I'm trying to calculate distance between 2 points that were previously extracted by expression. The modell right now looks like this (the other processes are deactivated): The models input is point ...
user avatar
2 votes
1 answer
28 views

Adding field to attribute table distorts existing columns using ArcMap [closed]

I am using ArcMap 10.6. I am intending to add a new field to the attribute table of a shapefile containing polylines in ArcMap. I started by loading the shapefile and opened the attribute table where ...
user avatar
3 votes
0 answers
68 views

Selecting and changing fields in QGIS graphical modeler

I am trying to run a model that makes a selection from a refactored and name changed field, and changes the value of the selection. Refactoring is easy, as is making the selection within the renamed ...
user avatar
  • 31
0 votes
2 answers
62 views

Populate NULL from existing value from another record

I'm using ArcGIS Pro on the table below (ACCT_ID field is sorted). The goal is to calculate/populate the "Asset" field where if rows have the same "ACCT_ID" and at least one of ...
user avatar
  • 721
2 votes
1 answer
44 views

ArcMap - Date field

I am trying to append some data to an existing enterprise geodatabase feature class, the data I am trying to append has a date field where some entries are in correct, eg instead of 03/19/1983 they ...
user avatar
1 vote
1 answer
36 views

Selecting attributes for field calculator by common name

I am trying to automate some of my GIS processes and have come across a snag in my automation. I am trying to understand the percent coverage of my suitability raster layer with my town boundaries ...
user avatar
  • 33
4 votes
4 answers
119 views

Removing file type from attribute table in QGIS

I imported a shapefile that contains track plots of SGY files into QGIS, and I would like to remove '.sgy' from the file names in the attribute table. In the image, I've highlighted the section of ...
user avatar
  • 51
0 votes
0 answers
36 views

ArcGIS Field Calculator: Sequential Numbers [duplicate]

I am attempting to populate a field with sequential numbers using Python or arcade but need to duplicate the sequential number created if values match in Field A. The below snippet obviously creates ...
user avatar
3 votes
2 answers
101 views

Removing decimal part from float field in QGIS

I have a field called "_mean" and I would like to remove the decimal part of all the values of that field. I attach two pictures. One an example of my variable ("_mean") in the ...
user avatar
  • 445
1 vote
1 answer
46 views

Calculating multiple fields using ArcPy

I am working on adding multiple new fields to a feature and then reclassify the values based on existing fields. Here is a part of the code where it does the reclassification and I am curious if there ...
user avatar
  • 327
0 votes
0 answers
38 views

Calculation problem

Trying to calculate terms and failing.I'm trying to figure out what's the problem? Indicates that all documents are on an external disk and not on the computer. if("area" <=1000, $...
user avatar
0 votes
2 answers
19 views

Pipe materials by percent of total length and length in miles

I am filling out a survey that asks questions about our water mains such as total miles in our system. This was easy to figure out with the length field. The next question asks "What is the ...
user avatar
0 votes
0 answers
52 views

Parameter missing in Calculate Field

I am trying to reclassify ACS census data into a new field for a gentrification project. I am trying to have anything above 47% classified as one and everything above classified as zero. When I looked ...
user avatar
-1 votes
1 answer
33 views

Summarizing a watermains layer to show pipe footage in miles for each material type and the percentage of each type [closed]

I have a water mains layer with a pipe material field and length field. I need to summarize this layer broken down into the length of each type of pipe material in miles. Currently, everything is in ...
user avatar
0 votes
2 answers
53 views

Calculate field of increasing number for each unique value in another field using ArcGIS Pro

I am using ArcGIS Pro 2.3. I have a point layer, for which I need to calculate a unique increasing number. I am trying to calculate a field "BlockUnique" with a sequential number sequence (1,...
user avatar
  • 76
3 votes
1 answer
51 views

Adding column that shows the number of parts of features

I want to create a new field in my attribute table that shows of how many parts each feature exists (QGIS). I know how to make a new field and where I can find the Field Calculator. I do not know the ...
user avatar
2 votes
2 answers
62 views

QGIS Field calculator cumulative sum with non-numerical index

I need to create an attribute with cumulative sum of another attribute. The values are sorted by a string attribute. I just found posts that involved the numerical id of the features. I've tried to ...
user avatar
0 votes
0 answers
20 views

Picking highest value between two options in field calculation using ArcMap

Is there a way to choose the highest value between two options when using them in a calculation? The highest value alternates between x and y This project is in ArcMap.
user avatar
1 vote
0 answers
22 views

Field calculator & features filtered by Datetimes

I'm using the Temporal Controller, and i'm trying to point out a label from layer A, on layer B. The layer B is empty (NULL), but has a field that brings the label of certain features of layer A. I ...
user avatar
4 votes
3 answers
122 views

Selecting certain text from attribute values in QGIS using field calculator

I am using QGIS 3.16 (Field Calculator). I have a number of values in the attributes of my GML file that read: 'Nonconiferous Trees' or 'Nonconiferous Trees (Scattered)' or 'Nonconiferous Trees, ...
user avatar
4 votes
2 answers
113 views

Populating field with sequential timestamp in QGIS

I have a point layer in a GeoPackage with this attribute table. name id timestamp A 1 23:03:2022T23:30:00 A 2 A 3 ... B 1 23:03:2022T23:30:00 B 2 B 3 .....
user avatar
0 votes
1 answer
74 views

Using Field calculator Logic in Python Script

I want to implement the calculation logic of field calculator in a custom Python script. Basically use QGIS inbuilt functions such as num_point, $area, perimeter etc function in my plugin for creating ...
user avatar
1 vote
1 answer
70 views

Add values from two raster layer as attribute to a polygon layer in QGIS

The following data sets are given: 1 Polygon layer ("target areas") Raster 1 (= digital elevation model) Raster 2 (= temperature) I have the following goals: For each polygon in "...
user avatar
  • 19
6 votes
1 answer
70 views

Extracting part of string from two columns at once in QGIS

I would like to extract numbers from two columns at once because I have the situation you see below. regexp_substr(regexp_substr("Address L1", '(\\d*) ')("Address L2"), '(\\d*)') ...
user avatar
  • 3,594
4 votes
2 answers
167 views

Move points into center of polygons base on common field attributes using QGIS

I have a shapefile of points and polygons layers with a common field attribute "Parcel_No". Each of the points share a common unique "Parcel_No" with the polygons, but the points ...
user avatar
1 vote
0 answers
33 views

ArcGIS Pro field calculator based on values code [closed]

I'm trying to calculate a field to produce symbol codes for GPS units based on a field "Grade". I've tried cobbling together the code based on samples I found; but got syntax error. The Code:...
user avatar
  • 11
2 votes
1 answer
38 views

Amalgamating zip codes using Python Parser of ArcGIS Pro Field Calculator

I'm fairly new to Python and I'm trying to amalgamate the zip codes from the fields of !OWADR2!, !OWADR3!, and !OWADR4! into a new field I've created. Basically I want to make a block of code in the ...
user avatar
0 votes
0 answers
18 views

Using Field Calculator to Symbolise point shapefiles

I am trying to symbolise a number of points by the species they represent. I want to group bats into one symbol and I am currently using this expression to get all the variable species and spellings ...
user avatar
0 votes
0 answers
12 views

Modeler Vectorlayer input as expression for field calculator

I would like to build the expression of my INPUT from QGIS Modeler into a command of the field calculator. Something like overlay_intersects( 'INPUT WKA' ). Is that possible?
user avatar
  • 233
4 votes
1 answer
120 views

Summing up values in rows with exceptions in QGIS

I have given my objects multiple value that represent a "need for action". I want to sum up those individual numbers to an overall "pressure for action". I have multiple objects ...
user avatar
  • 301
3 votes
2 answers
27 views

Area calculation of objects with the same, specific formulation

Can someone help me with the area calculation of certain objects in the attribute table? I want to add up all the objects that follow a specific, same formulation of a specific column in the table. I ...
user avatar
1 vote
1 answer
33 views

Determine if a polygon of one layer covers a polygon of second layer

I am looking for a command for an extra column ("Reference") to list Polygons of Layer1 as "1" if they cover Polygons of Layer2. If not they shall be listed as "0".
user avatar
  • 233
1 vote
0 answers
64 views

Conditionally skip field calculation for certain rows

Regarding the field calculator in the ArcGIS Pro 2.9 attribute table (Python): Is there a way to skip calculating a certain record, if certain conditions are met in the script? For example, if the ...
user avatar
  • 756
0 votes
1 answer
43 views

Field Calculator in ArcGIS Pro ModelBuilder does not show fields

I want to calculate a new field named "urbanisation_degree" based on data which I add earlier in the process. In a first step, I extract raster data to points using "Extract multi ...
user avatar
5 votes
2 answers
230 views

Replacing '.' and '-' in column values with empty space '' in QGIS

I have a shapefile that has a column named "SBL" with string values that contain points (.) and hyphens (-). However, I want to remove these points and hyphens, but so far I haven't been ...
user avatar
2 votes
1 answer
101 views

PyQGIS QgsExpression which categorizes the values of a field in a new field

I have a code that works well in the GUI for the field calculator but I am trying to make it work in the python console of QGIS. Firstly I start off with a roads then calculate the azimuth of the road ...
user avatar
3 votes
2 answers
142 views

Calculating field with text and data point from another field using ArcPy with ArcMap

I'm using ArcPy with ArcMap to try and calculate a field called URL. I'm having issues getting the correct syntax when trying to add text and then have a break in the text to add in a field !WellID!, ...
user avatar
  • 33
4 votes
2 answers
171 views

Calculation in an attribute table in QGIS?

I have the following attribute table: on which there are points on different types of lands. Each land has a code that is in the CODE_00 field, I have calculated how many points there are in each of ...
user avatar
1 vote
1 answer
37 views

Copy only field between different vector layers

I have a line layer, which I have created a buffer polygon layer from to count points in close distance. I now want the output of that count back in my line layer. How do I get the column in my old ...
user avatar
  • 301

1
2 3 4 5
45