Questions tagged [conditional]

Conditional, also known as Con, is a raster processing tool or expression that evaluates an if/else condition on each cell.

Filter by
Sorted by
Tagged with
1 vote
0 answers
24 views

Neighboring zones using a condition (expression)

We have a census tract layer which contains the total number of dwellings 'V_tot'. We need to group the census zones that intersect each other where their sum is in the range of greater than 150 and ...
user avatar
  • 11
0 votes
0 answers
16 views

Conditional incrementation in attribute table in QGIS [duplicate]

I split one vector line with various entities with the tool 'Split line by maximum length'. Now I need to have the order of different segment (create by the 'Split line by max length') for each ...
user avatar
2 votes
0 answers
41 views

Error while using "wbt_conditional_evaluation" in R from WhiteboxTools package "whitebox"

When I try to perform the conditional tools "wbt_conditional_evaluation" in R, I get this message error : Error running WhiteboxTools (conditional_evaluation) whitebox.exe_path: "C:/R/...
user avatar
0 votes
1 answer
56 views

Making relevant question required in Survey123

In my Survey I have several groups of questions where the answer is either satisfactory, unsatisfactory or not applicable. If the answer is unsatisfactory that prompts a four relevant questions. I ...
user avatar
1 vote
1 answer
61 views

Merging raster data with certain condition

I am doing a project and one demand is to create single raster by merging two rasters (Raster U and Raster R) into one (raster N) and only if conditions are met. The picture below shows those ...
user avatar
1 vote
0 answers
24 views

"no data" result from raster calculator

Am trying to implement the following line in QGIS raster calculator: ("L@1" < 0) * ((1 - 16 * 200 / "L@1")^0.25) + ("L@1" >= 0) * 1 Basically, when L is less than ...
user avatar
  • 11
3 votes
1 answer
100 views

Bold (or other style) part of a feature label in QGIS

I'm working on a map in QGIS (3.16.11-Hannover) and have a feature label that's generated from three attributes as follows: "Site name" || ', ' || "When" || '\n' || "...
user avatar
  • 33
0 votes
1 answer
53 views

Why does list.remove() not remove all items that meet the condition?

I have a bunch of feature classes in a geodatabase, and some of them are empty. I want to generate a list of all feature class names, and then remove the names of any feature classes that are empty. ...
user avatar
2 votes
1 answer
54 views

QGIS - auto fill values in one column which share the same value in a different column

There are three columns in the attribute table. part, forest with both unique IDs and factor with three possible values (yes, no, check). One forest contains many different part. If the factor is ...
user avatar
  • 23
2 votes
1 answer
92 views

Why does nothing happen with CASE statement in QGIS?

In QGIS, Field Calculator, I am trying to fill out an existing field (target) based on values on another existing field (source), both in the same shapefile. For each value x in the source, field set ...
user avatar
  • 21
1 vote
2 answers
57 views

Wrong Boolean result when checking the type of geometry in Google Earth Engine

I would like to set a condition based on the type of selected geometry. However, applying the following code seems to give wrong results. var geometryCollection = /* color: #008000 */ee.Geometry({ ...
user avatar
  • 161
5 votes
1 answer
102 views

Applying conditional label opacity in QGIS

I'm working with QGIS 3.16 Hannover. I've got one layer with all Spanish provinces (provincias) and, on top of it, several layers with the regions (AND, ARA, AST...). Each province pertains to one ...
user avatar
  • 2,283
2 votes
2 answers
116 views

Using Conditional Statement - SLD GeoServer - based on scale

Is there any way to use the conditional statement in SLD based on scale to set parameter for example: for scale between 25001 and 50 000 set size 15 for scale between 5001 and 25 000 set size 28 for ...
user avatar
  • 820
1 vote
1 answer
198 views

GeoServer CSS style with condition

I have street numbers with a specific field. I would like to show points with different colours based on this field and, on the same scale, display text of the street number itself, based on another ...
user avatar
  • 11
2 votes
1 answer
120 views

Rule-based symbol for point within polygon in QGIS

I would like to use a set of rules to draw features from a point_layer that are within a polygon_layer. Points that answer true to ("VAL_PROTECTION_EP3" = '1' AND "TYPE" = 1) ...
user avatar
  • 41
2 votes
1 answer
189 views

Conditional branch algorithm in QGIS modeler link to a certain layer and certain columm

I´ve got a modeler, which has limitation for the input. I want to build a conditional branch which stops the algorithm when the limit is overstepped. "example" - colum with numbers from ...
user avatar
1 vote
2 answers
43 views

How to NOT do a reduceRegion from empty image collections?

I am collecting the Kelvin temperature of a field from Landsat imagery for October for a period of 20 years. Due to clouds, there are some images that are being removed by my pruning, leading to ...
user avatar
  • 1,980
0 votes
0 answers
56 views

How to efficiently filter and select attributes based on conditional formatting?

I am wishing to filter my attribute table to display only certain values that meet certain criteria based on multiple column values. For example, I want to show all locations on my map that are Lost ...
user avatar
  • 13
3 votes
1 answer
315 views

Using Conditional Statement in QGIS for polygon categorization

I am trying to use Conditional Statements to assign distinguished colors to 10 different polygons within my shapefile. I want to have control over selection of the color for each polygon. Therefore I :...
user avatar
  • 291
6 votes
2 answers
392 views

How to group polygons based on spatial proximity and field value?

I have a shapefile consisting of the day of the year on which the temperature in a lake exceeds 15 degrees Celsius. I can see clear patterns in this (here seen as a raster): I want to group the ...
user avatar
  • 796
1 vote
1 answer
115 views

How to conditionally dissolve a vectorized layer?

I have a raster layer with the day of the year on which we observe temperature above 15 degrees. There are large differences (image below): I have vectorized this layer based on the Band including ...
user avatar
  • 796
0 votes
1 answer
76 views

Using conditional statements on raster not working in R

I'm trying to do this thing where I'm classifying climate and R just seems to not like it when I do if/and functions I don't even know someone please help me So I created a new raster entitled "...
user avatar
0 votes
2 answers
184 views

Conditional labeling in ArcMap using Python Parser

I am using ArcMap 10.8. I have 2 attributes: Toponym and Type. Toponym gives the name Type indicates if it is a city, town, church, etc. In English, I would like if Type = town, then capitalize ...
user avatar
2 votes
1 answer
222 views

Subtracting two raster layers based on condition in QGIS

I have 3 raster layers in QGIS. I want to subtract two from each other based on a condition in a third layer. 'Layer1': has no data in some parts and I used Close gaps to generate 'Layer1_fill'. What ...
user avatar
  • 889
0 votes
1 answer
116 views

How to average data from Sentinel-5p collection ignoring zero?

I am working with CH4 product Sentinel-5p provided by ESA Copernicus. Remote User Support provided a script to extract averaged CH4 anomalies for a certain period for the Earth Engine. However, I ...
user avatar
1 vote
1 answer
29 views

Raster product in PyQGIS does not produce correct results

I'm trying to mask (set with no data values) pixels in a raster not fulfilling a condition based on another raster. It runs well but it produces huge numbers that are not the values in the raster that ...
user avatar
1 vote
1 answer
121 views

Conditional Raster Calculation in Python QGIS [duplicate]

I would like to perform this raster calculation where when ras@1 >0 gives me 1 as pixel value of the output raster, while when ras@1 <0 the values are given by the other formula ras@1/(1-2.71828^...
user avatar
  • 165
3 votes
1 answer
179 views

Conditional statement in R based on multiple rasters

I have: raster_1: an integer raster with non-sequential values i (101, 130, 240, 323) i: a watershed discharging X of sediment in the environment raster_2: represents the water quality for each ...
user avatar
  • 31
3 votes
2 answers
183 views

Conditional calculation using QGIS

I want to apply an algorithm to calculate the clorophyll-a concentration of a reservoir using Sentinel 2. To do this I need to create a mask using Sentinel's 2 band 11(infrared) to separate the water ...
user avatar
  • 33
1 vote
1 answer
48 views

Condition statement not returning correct value [duplicate]

I may be missing something obvious here, but I cannot figure it out. In my attribute table under the area_ft_su column, I have a bunch of NULL entries. I want to change those NULL entries to zero ...
user avatar
  • 942
0 votes
1 answer
202 views

Creating condition for mosaicing images in Google Earth Engine JavaScript API

I am trying to create a mosaic of a several classified images using as criteria that every pixel has to be the same class at least for three images. A similar process can be done using the .min() or ....
user avatar
1 vote
1 answer
46 views

Extracting pixels from a raster list according to a value range and position in R

I'm working on a script on R and I have a doubt. I have a directory with a raster dataset of NDSI MODIS files. I want to create a list(or stack) of rasters whose first pixel (x=1, y=1) value is ...
user avatar
0 votes
0 answers
75 views

Condition with using geometry OLD and NEW

Is there a posibility to use a condition with OLD and NEW parameters? Using postgres 12, and pgAdmin Geometry in Qgis Trigger CREATE TRIGGER abc_trigger AFTER INSERT OR UPDATE OR DELETE ON "...
user avatar
  • 11
3 votes
1 answer
205 views

Using ELSEIF in QGIS Field Calculator

I found a similar question, but the answer solve the problem indirectly. So, here I reshape the question. Say, in the following situation, how am I going to use "ELSE IF" statement? CASE ...
user avatar
0 votes
1 answer
117 views

How to set all raster pixels within a shapefile to null?

I'm working with ArcGIS Pro 2.4.0. I have a raster dataset consisting of several plots of crops. Within each plot, there is a small ground target that has differing reflective values than the ...
user avatar
  • 463
1 vote
1 answer
163 views

Conditional Reclassification using Raster Calculator

There are several questions about conditional reclassification on the Stack Exchange, but I haven't been able to find exactly what I need... In my workspace, I have a list of raster layers (8 bit ...
user avatar
2 votes
1 answer
534 views

Conditional formatting with color and icon for table in print layout

I used the conditional formatting option in the attribute table (figure 01) in QGIS 3.12. I created a layout with the map and the attributes table (figure 02). With the option “apply layer ...
user avatar
  • 645
1 vote
1 answer
220 views

Property Is not like. GeoServer

Which function/condition should I use to get the opposite of "PropertyIsLike" in GeoServer?
user avatar
  • 55
2 votes
1 answer
204 views

Conditional formatting QGIS Legend

I use QGIS to create surface plots for measurements made in the field. I use the contour plugin. I usually create ~50 contours in order to make a smooth surface. When I use print composer, I generally ...
user avatar
3 votes
2 answers
148 views

Conditional statements in Field Calculator QGIS

Is it possible to modify the following syntax somehow that it would be applicable in Field Calculator in QGIS? The input layer is point layer and I would like to do following calculations which I can'...
user avatar
  • 165
1 vote
1 answer
98 views

Conditional statement using Long and Text fields with Python Parser of Calculate Field in ArcGIS Pro

I have 3 fields: "ISL_Numero" - Long (values are '1', '2', '3', '4' etc.) "Subtipo_IS" - Text (values are 'A', 'B', 'C' etc.) "Ambiente_C" - Text (values I want to ...
user avatar
5 votes
1 answer
1k views

Conditional calculation using raster calculator in QGIS

I have two rasters with the same extent, resolution, and projection, let's say raster A & B. What I want to do is something like this: IF A = 3 OR A = 11 THEN A+B ELSE B How can I do such a ...
user avatar
1 vote
2 answers
95 views

Writing if/then Statements for Python Parser of ArcGIS Field Calculator

For some reason I cannot get this code to work in the Field Calculator of ArcGIS Desktop 10.6.1. I'm trying to use the Python parser to populate the field "SHAP_CLAS" with multiple conditional ...
user avatar
1 vote
1 answer
670 views

Iterate through raster in R and apply conditional statements

I have a raster data set in R with numeric values ranging from 0 to 61.5, including some random NAs throughout. I would provide a reproducible data set, but I don't know how to create a raster with ...
user avatar
5 votes
1 answer
288 views

Clustering only if name attribute is same using QGIS?

I have a point layer on a world map with several attributes. Each point marks the position of a berth at a terminal in a port in a certain country. When I zoom out, it's getting too crowed so I ...
user avatar
3 votes
1 answer
187 views

Clustering geometry points, return a point's label if the point does not belong to a cluster?

I am clustering geometry points using the k-mean algorithm. The result is a list of clusters. Some clusters contain multiple points. Others only contain a single point. On the client side, we would ...
user avatar
  • 373
2 votes
1 answer
82 views

PostGIS query from three tables

I am new in PostGIS and want to learn. I faced the query where I have to find one point in two different layers or table. I created a query like this but it is not giving the desired result: SELECT b....
user avatar
2 votes
1 answer
211 views

Conditional statement in PyQGIS field calculator

I am trying to perform a if/elif/else routine in the field calculator environment from PyQGIS (i.e. coding in Python). My code is the following, however I keep getting indentation errors. The field ...
user avatar
  • 473
2 votes
0 answers
26 views

Conditional Expanding in ArcGIS Desktop?

I would like to reclassify a LC map given some conditional rules (raster with 8 classes total). Using the illustration, I would like to expand the green pixels (two distinct classes) on the white ...
user avatar
3 votes
1 answer
706 views

earthEngine expression and ternary operator: why does evaluate false value when always true?

Why does EE `.expression('A?B:C') take into account C if A is always true? I am using conditional operations with the image.expression('condition ? true_action : false_action) as documented here. My ...
user avatar
  • 1,703