Questions tagged [calculator]

Related to a "field calculator" interface for modifying field attributes.

Filter by
Sorted by
Tagged with
2 votes
1 answer
53 views

Raster calculator expression which includes the "STATISTICS_MEAN" value from the raster properties

I'm looking for raster calculator expression which includes the "STATISTICS_MEAN" value from the raster properties. How can I build the expression, that the value is automatically adapted? I ...
user avatar
  • 81
1 vote
1 answer
51 views

Copying field expression field calculator

I would like to know, how I can see the code behind a attribute field in the attribute table of a shapefile layer in QGIS 3.16. I have created a new data column with a specific code used in the field ...
user avatar
0 votes
0 answers
25 views

Averaging raster layers in QGIS, values changed, but image looks the same?

I am trying to average two raster layers together, but am getting results that are really confusing me, which is making me even question if an average is actually what I want to do to begin with. I ...
user avatar
0 votes
0 answers
28 views

Updating string field with a path by using Field calculator . Version 3.18.2

Us it possible to update newly made string type field (column) with a path to a file on a local drive by using "field calculator". I tried with first defining type of field as "String&...
user avatar
0 votes
0 answers
47 views

Error when calculating NDVI using raster calculator in QGIS

I tried to calculate the NDVI with the Raster Calculator in QGIS but got doubled (see image) and distorted results. I have a problem only in QGIS as SAGA works normally. Does anyone know what is ...
user avatar
0 votes
1 answer
15 views

Clip slope raster for values outside of percent grade range

I have a slope raster, but I would like to remove values (or make them no data value shading) outside a range which makes them too steep. I tried looking at the raster calculator, and I am not sure ...
user avatar
1 vote
1 answer
114 views

Summing all rasters in folder using Python

I have a folder containing many raster files (.tif). I want to sum all of the rasters in this folder into a single output raster using Python in Jupyter Notebook. I have been able to use GDAL command ...
user avatar
0 votes
1 answer
238 views

Unable to sum raster files in R using raster package

I am trying to sum all of my raster files (over 500) from a single folder in R, using the raster package, but am encountering an error message I cannot figure out how to solve. I am trying to use to ...
user avatar
1 vote
1 answer
204 views

Unable to use gdal_calc from gdal to sum raster files

I am trying to run the following line of code from Anaconda Prompt to add all all of the raster files in a directory/folder together using gdal: for %f in (*.tif) do gdal_calc -A %f -B result.tif --...
user avatar
1 vote
0 answers
39 views

Rasterize multiple polygons and calculate average

I have a vector layer that contains many overlapping polygons, each containing a "Value" in the attribute table. I am trying to rasterize each polygon as an individual raster layer, and then ...
user avatar
2 votes
2 answers
760 views

How to get directory from filepath in QGIS action

I have in QGIS layer that contains filepath (e.g. D:/file/28238/pic/D4D3-06_1.png) and I would like to get directory path only like D:/file/new/28238/pic. Is it possible to do by expression in field ...
user avatar
  • 31
1 vote
0 answers
27 views

QGIS 2.14.8 - Illustrate Multiple Lots [closed]

I am having trouble illustrating multiple properties on QGIS. Basically I want to illustrate multiple properties/polygons based on their identifying fields - lot and plan. Can anyone give me an ...
user avatar
  • 11
3 votes
2 answers
115 views

Copy and transfer only the maximum values of data from one column to another in the field calculator

In the Attribute Table there is a field with the diameter and width of the pipe. I want to transfer all the data from this field to a new field. While in one line there can be several values of the ...
user avatar
  • 43
1 vote
1 answer
102 views

Syntax to add attributes in a line in the Expression String Builder

I have several columns with certain values, here's an example: | Apple | Banana| Orange | Pear | Expected result | 1 | 1 | 1 | 1 | red | 1 | 2 | 2 | 1 ...
user avatar
  • 72.4k
1 vote
1 answer
4k views

How to calculate polygon areas in acres or square miles instead of feet?

I have a layer in State Plane NAD83. When I use "Vector|Geometry Tools|Add/export geometry columns" or Field Calculator they both create the area in feet. What if I want acres or square miles? Thanks ...
user avatar
  • 11
10 votes
4 answers
6k views

Getting latitude/longitude in Degree Minute Second (DMS) using QGIS Field Calculator

I have come up with the following expression to convert 5.1234 to 5°7'24.24" toint($x) || '° ' || toint((($x) - toint ($x))*60) || '`' || substr((tostring(((($x) - toint($x))*60) - toint((($x) - ...
user avatar
  • 109
2 votes
2 answers
3k views

How to select only areas bigger than x acres?

I would like to create a new shapefile from another area shapefile. The new shapefile should only contain all areas that are bigger than 5 acres (10.000 m²). How do I do this?
user avatar
  • 2,161
3 votes
1 answer
544 views

Sum up area left "underneath" polygons in QGIS?

I have an area shape layer and multiple other area shape layers. Now I would like to calculate how much space (square kilometers or percentage of area) of the polygons of this area layer is NOT ...
user avatar