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 (...
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 ...
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 ...
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 ...
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-...
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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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'...
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 ...
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 ...
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 ...
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 ...
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 ...
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.
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 ...
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.
...
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')
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.
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 ...
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....
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 ...
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 ...
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 ...
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) ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
boolean × 42arcgis-desktop × 12
qgis × 11
modelbuilder × 8
arcpy × 7
fields-attributes × 6
raster × 4
postgis × 4
arcmap × 4
google-earth-engine × 4
raster-calculator × 4
arcgis-pro × 3
python-script-tool × 3
arcgis-10.2 × 2
attribute-table × 2
geometry × 2
overlapping-features × 2
parameters × 2
update × 2
null × 2
conditional × 2
calculate-values × 2
python × 1
gdal × 1
arcgis-10.0 × 1