Field calculators (available in QGIS, ArcGIS Desktop, etc) can recalculate the values of a single field on all, or selected, records within a table using an expression.

learn more… | top users | synonyms (1)

3
votes
0answers
40 views

Translating ArcGIS field calculator python expressions in to QGIS field calculator python expression?

I'm transitioning to QGIS from ArcGIS. I'm having trouble getting my python field calculator expressions to work in the QGIS advanced python field calculator. Here is a screenshot of the working ...
3
votes
0answers
345 views

How to calculate percentages using QGIS field calculator expression?

I am new to QGIS. I am wanting to calculate a field using other fields and some operators. Here is my expression: case When "RVM_CAT" = 'B' OR "RVM_CAT" = 'C' Then ("PC1" /100) * "RE_ha" When ...
3
votes
0answers
126 views

Using Field Calculator to Convert Data Type In Field

I am trying to convert a field that is listed as "String" because it was imported into QGIS as a CSV (rural poverty population percentages by county in NC). I need to convert the percentages field ...
2
votes
0answers
23 views

Using ModelBuilder to calculate field in a point dataset based on polygon dataset?

I am attempting to take stormwater point and features and calculate a field "SUBBASIN". The subbasin layer is several polygons of a stormwater basin. In the point feature, I am trying to calculate the ...
2
votes
0answers
37 views

QGIS graphical modeler calculator

My question is about the calculator in the QGIS graphical modeler. I explain my problem issue first: I want to build a modeler that creates buffers around layers and makes a selection on a second ...
2
votes
0answers
46 views

Finding and using mean and standard deviation value in field calculator

I am creating a field for a z-score of a particular attribute. This requires calculating the mean and the standard deviation for the attribute across all features. I've been using the statistics ...
2
votes
0answers
79 views

Creating a weighted rating model/script for vector data

I'm using ArcMap and trying to create a model or script that can rate routes based on a weighted calculation of attributes. Right now the individual attributes don't have rating values which I could ...
2
votes
0answers
119 views

How to add column to attribute table using field calculator with $length function?

I used the following code to add a separate column to the attribute table with the length of features. from PyQt4.QtCore import QVariant from qgis.core import QgsField, QgsExpression, QgsFeature ...
1
vote
0answers
27 views

Grid interpolation using a new calculated field

Still learning.... I am trying to run the grid interpolation tool on a point shp file. I can successfully use the tool with the existing data but cannot run the tool on a new field I created in the ...
1
vote
0answers
45 views

Populating an attribute field using calculations based off fields of another feature class

I have hundreds of 'agriculture' polygons in one feature class, and each polygon is surround by numerous 'margin' polygons in a separate feature class. What I would like to do is select all the ...
1
vote
0answers
73 views

Reduce Z value precision in QGIS

The .asc LiDAR files provided by the environment agency have height values provided to a precision of the level used to measure atoms. How to quickly lose a few of the pointless digits on the end to ...
1
vote
0answers
63 views

Replacing Null values with field calculator

My goal is to use the field calculator to replace null values. I am trying to replace nulls in the ToDate_Time with the FmDate_Time. When I run the code below the results window says that it worked ...
1
vote
0answers
64 views

Converting UTM to Lat Long inside a Game Engine(Untiy 3d)

This is my first post on Stack Exchange. I have exhausted my research through the game engine forums, so I am trying this forum since you guys seem to be the experts. I have an external device that ...
1
vote
0answers
43 views

Using timestamp field to auto complete source field in QGIS

I am trying to use my timestamp field to autocomplete my source field in QGIS using the field calculator. I want my source field to be completed with a saved string e.g "Sam_Sam". I want my source ...
1
vote
0answers
63 views

How to create a sequential unique id by groups?

I'd like to use the field calculator in QGIS to create a unique feature (polygon) id that reflects different levels in a geographic hierarchy. So say I have a REGION attribute within which there are ...
1
vote
0answers
57 views

Using ModelBuilder or Python parser of Field Calculator to check values between two datasets?

I have a *.dbf that I need to check values against for a shapefile. I need to report whether the values match the dbf in the shapefile and, if not, what the value should have been (in two new ...
1
vote
0answers
56 views

If then statement in model builder

I have a model that adds several fields, two which are manual inputs (County Name and User). I am manipulating several parcel layers (approx 90 counties). In my model, one field takes the state and ...
1
vote
0answers
24 views

Incorrect Acreage QGIS 2.6.0

I have six polygons, all of (fairly) similar size. The first one is 8 acres, the others are obviously wrong with 120,000 acres, and 106,000 acres and so on. I am calculating with the field calculator, ...
1
vote
0answers
51 views

Systematic inaccuracy in QGIS shape area

I’m trying to find out why I get different area figure in QGIS than in AutoCAD when I’m using the same shape file? What I did is I drew a shape in AutoCAD, imported it in QGIS and used the field ...
1
vote
0answers
98 views

Assigning score to raster based on cell overlap with other raster and field value

I have a set of rasters that I've assigned scores to individually (scored based predominantly on values of other fields). The scoring scale is the same for all rasters, but the factors that determine ...
1
vote
0answers
55 views

QGIS (2.0.1): Field calculator for length not working - values way too high

Same problem as another thread: Field Calculator returning incorrect length and area values Trying to calculate length of a line shapefile, and field calculator is returning values that are way too ...
1
vote
0answers
536 views

Field Calculator stopped working

The field calculator seems to have stopped working for one of my attribute tables (it works fine on others). No matter what I get it to express (I've tried simply 2*2, just as a test) it just produces ...
1
vote
0answers
113 views

Geometric functions in field calculator in QGIS

I had a look in the manual of QGIS and I also browsed the Internet to find some useful information about the geometric functions of the field calculator. I've found this post but I'm still confused. ...
1
vote
0answers
425 views

Cumulative field calculation using Python in ArcGIS for Desktop?

I am using the following Python code to sum cumulatively but I need the summation to take place while the other field is equal to 1 and then again start the summation when it's equal to 2. I need the ...
1
vote
0answers
36 views

Can a joined-layer have its attribute changed depending on what layers are selected/deselected?

Using QGIS, I have a polygon-grid layer which covers everything, Layer_All joined with 2 other grid layers: Layer_1 and Layer_2, both of which intersect at various points. I would like Layer_All to ...
1
vote
0answers
315 views

Select Expression and Field Calculator in ONE STEP with QGIS

I have an Open Street Map Shapefile and i want to use Field Calculator to add information to a field called a800900 according to the field TYPE of street, by different area (field called ID_2). The ...
1
vote
0answers
220 views

Import csv file and use “toggle editing” and “field calculator” without Saving it as a Shapefile.

I am importing a .csv file in QGIS and I have also made the *.csvt file where I have specified my data types. I still cannot use "Toggle editing" and "field calculator".Whether I must save it as a ...
0
votes
0answers
28 views

Extract characters from an existing string field to create a new field

I have a string field named CHESS2016_N94S_FL1_C__20160407230029.562GMT_COLOR-8-BIT.JPG and I would like to select characters 16-18 to populate a new field. I've been trying to use the field ...
0
votes
0answers
15 views

Number of markers depending on attribute

Is it possible to have a line vector layer where the number of markers is dependent on a particular attribute? e.g. I have the attribute "number of X" which depends on $length (number of X = ...
0
votes
0answers
38 views

Work values of a table in QGIS!

I have a table associated to a shapefile with the number of people who live in different villages and the corresponding city. I want to define a new shapefile with points located in the centroide of ...
0
votes
0answers
27 views

Calculate field for each Feature Class in Dataset using Python and different arguments

I have Dataset with Feature Classes in it. I'm building this in ModelBuilder. I want to calculate new field (SMB_ID) depending on attributes for each feature class. I was trying to make it simple ...
0
votes
0answers
52 views

Concatenation of fields with if or when circumstances

I have a field named PROJECT_DESCRIPTION that concatenates the STREET_NAME, FROM and TO fields. Sometimes the FROM or TO fields are only address ranges. In my PROJECT_DESCRIPTION field I would like to ...
0
votes
0answers
37 views

Linking Statistics Type with Calculate Field after Table Join using ModelBuilder?

I am attempting to build a model using ModelBuilder in which there is a zone statistics tool being run iteratively for a set of rasters. The input is a blank template table that contains the number ...
0
votes
0answers
40 views

Added Field not showing in calculate field tool in modelbuilder

I am attempting to create a model that adds a field of the same name to multiple output feature classes, then calculates unique values for this field for each feature class. See the model below: ...
0
votes
0answers
116 views

How do I calculate the travel time between patients and hospital by helicopter and make a map out of it?

I have a layer(.shp) with hospital location and a layer(also .shp) with pick up positions of patients by helicopter. The table with the position of patients has two columns, one with departure time of ...
0
votes
0answers
123 views

How can I convert Decimal to DMS for QGIS reprojection?

I have the following Lat/Long which I converted to DMS using the following calculator: Decimal DMS -96.2 96 12 0 -95.13 95 7 47.9994 29.3 29 18 0 29.98 29 58 55.1994 ...
0
votes
0answers
74 views

simple if statement in ArcMap field calculator

I have two fields containing string variables. The first one is f and the second one is f1. I would like to create a new field and populate it with the following: if f1 is equal to f, return f1 if ...
0
votes
0answers
30 views

x and y coordinates will only display [x],[y] when field calculator is used to make a url

The standard formula for a google maps url is: https://www.google.com/maps/@-15.623037,18.388672,8z https://www.google.com/maps/@(latitude),(longitude),(zoom level)z I am trying to make a new ...
0
votes
0answers
92 views

Problems with rasterization through QGIS Modeler

My goal is to rasterize a vector polygon-based shapefile. Whenever I run in the modeler or even from the Processing Toolbox the Rasterize tool of GDAL, I receive a raster layer that's not good for ...
0
votes
0answers
77 views

Line length for line files

Using QGIS, Brighton 2.6. Trying to calculate line-lengths for linear features (roads, trails, fenceline) and used this post (How to find line length in QGIS while editing?) and the links associated ...
0
votes
0answers
139 views

Python script to get feature count in a feature class that fall in a specific range

I need to write a Python script to be used in the ArcGIS Field Calculator that will return a feature count for values between a range defined by the values in two other columns. Here is a graphic ...
0
votes
0answers
170 views

Why will my field calculator python function always return Null if any inputs are Null?

I've written a simple python function that outputs a list based on yes/no fields. It appends a word to a list if it has a "yes" in another column then writes the list, formatted according to the ...
0
votes
0answers
164 views

Concatenate an object ID and string to publish gp service with field calculator?

I have a simple model which concatenates and object id and a string, to create something like 1SRS2567, the concatenate function of OID and the string field are able to be passed in VB, but not ...
0
votes
0answers
108 views

calculating decimal degrees from coordinates found in an excel table

What is the exact syntax to use when calculating decimal degrees in the field calculator? I know the general formula {i.e. Degree + (minute/60) + (second/3600)} but how do I put this into the gis? I ...
0
votes
0answers
186 views

ArcGIS Python Field Calculation

Ok so i've got a problem with the field calculator in ArcGIS: I'm already pretty far with it since i got some help :P but it still doesnt work. What i've got: -A complete table of several states of ...
0
votes
0answers
697 views

New values created with QGIS field calculator become null upon saving

I'm having a problem with QGIS. I'm trying to create a new column in the attribute table for a shapefile. The numbers in the fourth column (see screenshots) are currently strings, so I want to convert ...
0
votes
0answers
90 views

Populate a new field with list of the top 5 values of all fields for that record

I have 15 fields. I would like to add a new field that is populated with the field name and value of the top 5 highest values of the 15 fields for each record in the table. The new field would be a ...
0
votes
0answers
120 views

Doubt in Field Calculator

I am working in an project.I have a point Shapefile its projection is NAD83(HARN)Pennslyvaniasouth(ftUS)*EPSG3365* when I measure its distance(between two points) it gives me the answer in feet .yes ...
0
votes
0answers
682 views

Using Field Calculator to Calculate a Mean for Multiple Rows

I am trying to calculate a mean across a multiple number of attribute rows and have this value added to a new field that I have entered in the attribute table. I have an attribute table which has a ...
0
votes
0answers
314 views

python script to calculate and return values based on several conditions

I need to calculate and return the value "continuous" to those records in a polygon feature class with species records aggregated to a UTM grid considering the attributes are species name, grid code, ...