Skip to main content
8 votes
Accepted

Overpass API Boolean Filtering?

We can formulate the answer in different ways: Option 1: Basically, you want to remove those amenity=embassy from your current result list, which have a diplomatic value that is not embassy (...
mmd's user avatar
  • 4,732
8 votes
Accepted

Using boolean value in QGIS style rule

When using a boolean, you need to use the IS operator instead of LIKE. So your expression should be: "field" is true However, since you want to select the fields which are TRUE, you can ...
MrXsquared's user avatar
  • 35.6k
6 votes
Accepted

Change boolean value in QGIS by CASE WHEN

If you update a field in QGIS Field calculator, just specify the value, don't then "Field_2" = something, just then something. For your code, try : CASE WHEN "Field_1" = 'YES' THEN True ELSE ...
J. Monticolo's user avatar
  • 15.9k
6 votes
Accepted

Concatenating field names if value is true using QGIS expression

It work almost the same in QGIS. The & (concatenate) is || (double pipe) and you should use double quote around field name and single quote around text string. Also the If fonction require the 3rd ...
J.R's user avatar
  • 17.4k
5 votes
Accepted

Making Boolean field with ArcGIS Pro

According to ArcGIS Pro documentation they don't support Boolean type in feature classes and tables, see https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/arcgis-field-data-...
Anna Goldenstein's user avatar
4 votes

Check for field, add or skip to next step if exists in ModelBuilder?

I believe you need only use the Merge Branch model only tool. As you can see in their figure the two branches feed into the merge branch tool resulting in a single output that continues the workflow. ...
Hornbydd's user avatar
  • 44.6k
3 votes

Can a Geopackage Boolean field contain a NULL value?

By the GeoPackage standard the Boolean values are stored as zero or one: A boolean value representing true or false. Stored as SQLite INTEGER with value 0 for false or 1 for true. So at the SQLite ...
user30184's user avatar
  • 69k
3 votes

Boolean fields from PostGIS data type changed to QString in QQIS

I solved my problem with the following approach: In the field which holds the boolean value, I defined a checkbox as edit widget under layer properties -> fieöds and set the representation for ...
LaughU's user avatar
  • 4,204
3 votes
Accepted

Cannot set boolean operator within ArcMap ModelBuilder as True

The only way I could get the Boolean to stay as 'True' was as follows: Add the Boolean as a variable, add the clip tool Add the raster and clip feature Make ANY selection on the clip feature (this is ...
jbalk's user avatar
  • 7,612
3 votes
Accepted

Boolean precondition in ModelBuilder not exporting to Python script

The ISG_Template and VC_Template values are not Boolean values anymore, since you brought those parameters in as text using the arcpy.GetParameterAsText() function. So your conditions should most ...
Richard Fairhurst's user avatar
3 votes

Generating dummy variable if point lies inside polygon using QGIS

The solution has been provided by @DPSSpatial already, but let me try to demonstrate a Virtual Layer approach (hence sqlite, as commented by DPSSpatial ): Example Please consider some elephants were ...
Kazuhito's user avatar
  • 31.2k
3 votes
Accepted

Using Update Cursor gives IndexError: list assignment index out of range?

Your update cursor has four values in its row: ["Base", "Top",rastername, fieldname] corresponding to row[0],row[1],row[2],row[3] respectively. row[4] is out of range because it is the fifth of four ...
Hayden Elza's user avatar
2 votes
Accepted

Selecting lossyear polygon of Hansen data

OK, got it. I don't know javascript, so either logical operators don't work the way I'd expect or (my guess) EE requires working with the purpose-built functions like and() and or() which I guess aren'...
antifrax's user avatar
  • 138
2 votes

Conditional zonal statistics

In GRASS-GIS you can do it quite easily. Assuming your binary raster with 1/0 value is named 'my_binary_raster', and the other you want to compute the mean value is named 'base_raster'. Don't forget ...
tgrippa's user avatar
  • 46
2 votes

Setting up if/then/else for choice of two options or boolean in ArcGIS ModelBuilder?

Although if-else statements are not as user-friendly as they should be in Modelbuilder, Esri did develop the 'If Field Value Is' tool to do this kind of logical selection. Esri Document on 'If Value ...
Liam's user avatar
  • 348
2 votes

Creating boolean raster using ArcGIS Pro

Use the Cell Statistics (Spatial Analyst) tool. Use the maximum or minimum statistic and ensure Ignore NoData in calculations is checked. You'll now have an output raster of all the 0's and NoData In ...
user2856's user avatar
  • 69.6k
2 votes

Calculating values from two rasters using QGIS Raster Calculator

You can try this nested IF statement in the raster calculator: if ("R1" = 0 and "R2" = 0, 0, if ("R1" < "R2", "R1", "R2")) Give the ...
jpinilla's user avatar
  • 3,240
2 votes

Why does the order of queries matter in overpass?

The data has changed since then, but if you run the following query now, you get 64 with brand first and 65 with name first. The reason for that is that only 64 places have the brand and name tag, and ...
XaC's user avatar
  • 407
1 vote
Accepted

GDAL ogr2ogr SQLite Booleans changing to false

A problem with booleans was fixed a while ago in GDAL... Please try with the latest GDAL version (3.9.2) please.
Pieter's user avatar
  • 4,119
1 vote
Accepted

QGIS based rules symbology with boolean options

For the non combined cases, add a second condition to exclude the cases that should not match (mutually exclusive groups): "branch"=true AND "derivation" <> true -> shows ...
Babel's user avatar
  • 74.9k
1 vote

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

Your code give wrong results because drawingTools has not any layer. So, I took your geometries (polygon, p1, p2) and put them separately in GEE Map Canvas; as it can be observed in following image. ...
xunilk's user avatar
  • 30.2k
1 vote

Writing mathematical expression in Google Earth Engine

Your last parameter in the Map.addLayer cal is the image again, not a name. This line: Map.addLayer(ibi,{min:-1 , max:1},'UI', ibi) should be: Map.addLayer(ibi,{min:-1 , max:1},'UI', 'ibi')
Noel Gorelick's user avatar
1 vote

Writing mathematical expression in Google Earth Engine

The problem is in the last line of your script, not the line you have shown. Map.addLayer(ibi,{min:-1 , max:1},'UI', ibi) Here the fourth argument should be a boolean but is the image ibi.
Kevin Reid's user avatar
  • 10.5k
1 vote

Using IF-THEN-ELSE with ModelBuilder of ArcMap

So what is your question? So far you state what you have done but not said what the issue is! If it is not working then one issue may be your code block, its missing a colon at end of the first line ...
Hornbydd's user avatar
  • 44.6k
1 vote

Trouble updating field calculatd by st_ functions

I think there is no issue with your second query. It returns true or false for features that are in the second table. But as your second table is empty the result from your inner select query is empty....
Arun's user avatar
  • 136
1 vote

Using Boolean And to overlay layers in ArcGIS Pro?

If you are wanting to create a final binary raster where the cell is 1 if all other cells from the 5 rasters are a non-zero number and 0 if at least one cell is zero in the 5 rasters then you can use ...
Hornbydd's user avatar
  • 44.6k
1 vote

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

That's not due to the expressions. It simply you cannot take the asin() from values outside the range [-1-1]. Possibly, the earth engine evaluates both possibilities and if one is wrong, it returns a ...
Kuik's user avatar
  • 10.1k
1 vote

Converting from Boolean to point features using ArcPy?

So you have a bunch of random points and you want to get rid of the ones that aren't in the polygon? You can make layers from both and use the INVERT selection to pick all the points that aren't ...
Marc Pfister's user avatar
  • 4,127
1 vote

error in reasoning: logical operators in raster calculator

I changed the code a little. Now it works, I think. ( ("a@1"=1) OR ("b@1"=1) )+ ( ( (("a@1"=5) AND ("b@1"!=1)) OR (("b@1"=5) AND ("a@1"!=1)) )*5 )+ ( ( ("a@1"=0) ...
Kevkev770's user avatar
  • 375

Only top scored, non community-wiki answers of a minimum length are eligible