Skip to main content

Questions tagged [boolean]

Boolean logic is the branch of algebra in which the values of the variables are the truth values true and false, usually denoted by 1 and 0 respectively. It is considered a complete system for logical operations. Many GIS software have Boolean operators available, particularly in the raster model.

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

Bypass warning using "If Field Value Is" using ArcGIS Pro ModelBuilder

I'm using the "If Field Value Is" in ArcGIS Pro ModelBuilder so that the naming of the output file is different based on each selection earlier. I get the warning "The process did not ...
Siegmund's user avatar
1 vote
1 answer
148 views

Calculating values from two rasters using QGIS Raster Calculator

In QGIS I'm trying to write an expression in the Raster Calculator, but I have failed so far. It should go like this: R1 and R1 are input rasters, RN is output raster. if R1=0, OR R2=0, then RN=0 if ...
Elenica's user avatar
  • 41
1 vote
0 answers
220 views

Get checkbox for Boolean field in attribute table

I have a dataset with a lot of Boolean fields. In the attribute table, they are represented with text (either true oder false). If I click into the cell, I get the checkbox I also get in the attribute ...
e-shirt's user avatar
  • 667
2 votes
1 answer
246 views

Concatenating field names if value is true using QGIS expression

I have multiple boolean fields. I want to create a new string field, that is concatenating the field names of my existing fields when their value is true. I want the names separated by a comma. I am ...
e-shirt's user avatar
  • 667
1 vote
0 answers
114 views

Creating Boolean raster layer / QGIS PCRaster View error: type is ordinal, legal type is boolean

In QGIS 3.30, I try to use PCRaster View tool. I have two rasters, saved in PCRster (.map) format as PCRaster plugin seems to only accept this filetype. Both rasters have the same extent, resolution, ...
Babel's user avatar
  • 73.1k
1 vote
1 answer
645 views

Making Boolean field with ArcGIS Pro

With QGIS is very simple create a Boolean field, I need do the same with ArcGIS Pro. After a lot years I use this ESRI product, last one there was ArcGIS 9.x. I remember that with the old ArcGIS ...
MaxDragonheart's user avatar
2 votes
2 answers
259 views

QGIS based rules symbology with boolean options

I have a point layer with some boolean fields. I have created a symbol for each field when it is true. However, when I create new symbologies for combined cases with more then one field true, I ...
ennine's user avatar
  • 863
4 votes
2 answers
326 views

Can a Geopackage Boolean field contain a NULL value? [closed]

QGIS 3.24.3. When I create a Geopackage Boolean field, the default display is the word false, displayed in italics. Likewise, if I calculate the Boolean field = NULL, they also display as an italic ...
Stu Smith's user avatar
  • 8,192
0 votes
0 answers
132 views

Toggle Model Builder paths on and off using Boolean - ArcMap 10.5

I have a program that uses an iterate over a multivariable to run checks for different values, but it would be really nice to just be able to toggle the values on and off depending on what you are ...
Sam R's user avatar
  • 1
0 votes
1 answer
658 views

Creating boolean raster using ArcGIS Pro

I am using ArcGIS Pro. I try to perform a Boolean analysis (0 and 1 value) and I am stuck at a problem. I will mention the steps I did, first to get an idea. I have multiple vector layers. I created a ...
gis1234's user avatar
  • 319
0 votes
2 answers
197 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({ ...
farhat's user avatar
  • 151
2 votes
2 answers
784 views

Writing mathematical expression in Google Earth Engine

I am trying to run the expression below in Google Earth Engine to calculate Index-base Built-up Index(IBI) var ibi = l8compositeMasked.expression( '(2*SWIR/(SWIR+NIR)-((NIR/(NIR+RED))+(GREEN/(...
Mary Amponsah's user avatar
1 vote
0 answers
35 views

How to use Boolean input in Arcgis with arpy? (Desktop edition) [duplicate]

So, my code goes something like this: haveopenvel = arcpy.GetParameterAsText(10) arcpy.AddMessage(haveopenvel) if (haveopenvel == True):#error openvelftsec = Raster(openvelftsec) arcpy....
Debayan Mandal's user avatar
0 votes
1 answer
137 views

Using IF-THEN-ELSE with ModelBuilder of ArcMap

I have two optional parameters in my ArcMap model (City and date) and I want to use the tool calculate a value to create an expression that will give me a boolean (true-false). I want the code to ...
Anne L.'s user avatar
7 votes
1 answer
142 views

Why does the order of queries matter in overpass?

I am new to overpass / OSM. I want to locate Dodo Pizza in Moscow, a specific chain of fastfood. Since these restaurants are sometimes tagged by brand and sometimes by name, I ve included a or ...
greg hor's user avatar
  • 171
1 vote
1 answer
228 views

Boolean precondition in ModelBuilder not exporting to Python script

I don't know python so I often use ModelBuilder and export to python script. In this case, I have a model (that in itself is made of python scripts that have been exported from models) that works fine ...
Steve's user avatar
  • 773
1 vote
2 answers
123 views

Trouble updating field calculatd by st_ functions

I had first run this code on several of my fields of my T1 table at the same time. UPDATE table_1 SET field_1 = liste.my_bool FROM( SELECT T1.id AS name, bool_or((ST_Contains(T2.geom, T1.geom)...
Basile's user avatar
  • 617
2 votes
1 answer
846 views

Change boolean value in QGIS by CASE WHEN

I'm trying to change a field value by the next conditional SQL script from a PostGIS database in QGIS Field Calculator: case when "Field_1" = 'YES' then "Field_2" = 'True' else "Field_2" = 'False' ...
Rodrigo Vargas's user avatar
1 vote
1 answer
657 views

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

I'm using ArcGIS Desktop 10.6 and have a model as shown in the image below. I'm calling it option 1. The model exports GIS data to CAD DWG format and is comprised of two submodels, "Setup" and "Export"...
Steve's user avatar
  • 773
0 votes
2 answers
646 views

Using Boolean And to overlay layers in ArcGIS Pro?

I am working for a project related to a site selection in which I have 5 layers to overlay to have as result: Zone1: area suitable Zone2: area not suitable. Boolean And seems to be the perfect ...
high_point's user avatar
3 votes
1 answer
1k 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 ...
Matifou's user avatar
  • 2,021
0 votes
1 answer
64 views

Converting from Boolean to point features using ArcPy?

I used geometry objects and da.searchCursor to check if randomly created points fall within polygon. Now I get True and False of each points that falls within or outside of the polygon. I made a list ...
user133294's user avatar
0 votes
1 answer
959 views

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

I am trying to use an update cursor and receiving an error. I'm not very familiar with using cursors, so please bear with me. I am trying to write a 1 or 0 to a field, based on a condition. The error ...
phead's user avatar
  • 13
3 votes
1 answer
242 views

Selecting lossyear polygon of Hansen data

I'm working with Hansen database in Google Earth Engine. I would like to select polygon of two different years for example 2010 and 2011 for a certain area using lossyear map. This is my code: var ...
matt85's user avatar
  • 83
2 votes
1 answer
185 views

Conditional zonal statistics

I have often used the Zonal Statistics plugin to calculate the mean pixel value of a raster. However, this time I have an additional Boolean (pixels are equal either to 1 or to 0) raster, which is ...
Jackk's user avatar
  • 533
1 vote
2 answers
506 views

error in reasoning: logical operators in raster calculator

I'm processing a formula in QGIS raster calculator and have an error in reasoning. Having the layers a and b I want to create output layer c under the following conditions: (1) if a = 1 or b = 1 --&...
Kevkev770's user avatar
  • 375
2 votes
0 answers
153 views

Visualizing Strahler-Order bigger than a specific value

I try to visualize the Strahler-Order bigger than 8 using raster calculator. I changed the style of the raster by changing the render type to singleband pseudocolor and, in the colors selector, I ...
Mohamad Reza Salehi Sadaghiani's user avatar
5 votes
4 answers
1k views

Boolean fields from PostGIS data type changed to QString in QQIS

I have a layer in QGIS loaded from a PostGIS database. In the layer properties dialog in QGIS, under the fields tab, layers with a typename of 'bool' (which are boolean fields in the PostGIS database) ...
George of all trades's user avatar
1 vote
1 answer
133 views

Cannot set boolean operator within ArcMap ModelBuilder as True

I'm trying to set up my own tool to automate processing ASCII data (3D laser scanning data exported from the software CloudCompare) and have thus far got everything running pretty much as I would like ...
Bradley Sparkes's user avatar
5 votes
1 answer
2k views

Overpass API Boolean Filtering?

So I'm trying to get a good list of embassies from Overpass, here's my initial query: [out:json]; ( node["amenity"="embassy"]; way["amenity"="embassy"]; relation["amenity"="embassy"] ); ...
user2361174's user avatar
4 votes
1 answer
1k views

Generating dummy variable if point lies inside polygon using QGIS

I have a set of polygons in JSON or GeoJSON format and a set of points in a CSV (both containing geographic coordinates). I am able to join these two datasets in QGIS and display them. I want to ...
Matteo Ruzzante's user avatar
2 votes
1 answer
2k views

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

I am building a model to add many fields to an iteration of feature classes. For each step (broken into sub-models) to add a field I am checking, using a boolean Field Check script, whether the field ...
VP_Holla's user avatar
0 votes
1 answer
222 views

Creating attribute field with restricted values on ArcMap? [duplicate]

I am looking to create a field in my attribute table for polyline features and I want the values for the field to be restricted to specified options (that is, a field with just YES/NO value). Any ...
Strategist D.'s user avatar
4 votes
2 answers
2k views

python script tool validation checkboxes to radio boxes?

I am trying to build a tool in arcmap, which uses radio buttons in its gui. Since I read, that radio buttons are not supported, I figured, it couldn't be too hard changing the behaviour of simple ...
fry82's user avatar
  • 133
1 vote
0 answers
152 views

Determining mathematical expression for Boolean logic with 5 raster layers in ArcGIS for Desktop? [closed]

I have 5 layers in ArcGIS 10.2 for Desktop, and i want to apply Boolean Logic. What will be the mathematical expression in "Raster Calculator". I know that for to layers expression will be like ("...
Nisar's user avatar
  • 19
1 vote
2 answers
1k views

PostGIS: ST_Within returns "t"/"f" letters instead of "true"/"false" booleans

I have simple query which contains among others: SELECT ST_Within(ST_GeomFromText('POINT(lon lat)', 4326), buildings.geom) AS is_within So I expect the result column is_within to be Boolean value. ...
michael's user avatar
  • 1,809
0 votes
1 answer
287 views

Boolean GetParameterAsText in a loop

I have this tool where the user inputs an ID number and the tool selects a list of features applies symbology (.lyr) and adds the queried features to the open mxd. # Import modules import arcpy ...
Brad Jones's user avatar
3 votes
5 answers
10k views

Using Boolean parameters in Python Script Tool of ArcPy?

I'm using ArcGIS for Desktop 10.3.0.4322 I have a script tool which requires a parameter (folder path to a gdB, via GetParameterAsText) so that a later process can be saved there. The thing I want to ...
JumpInTheFire's user avatar
11 votes
3 answers
5k views

Using boolean value in QGIS style rule

I'm trying to make a style based on rules, and I want to use a boolean field I have created for that. But I do the following: "field" like 'TRUE' "field" like TRUE "field" like 1 "field" like '1' ...
exodehm's user avatar
  • 939
3 votes
1 answer
680 views

How to update only non-empty fields with a user input value in a model?

I have a model which iterates through a GDB, populating the same attribute field in every feature class with a parameter value. In this way I can mark all FC's in the geodatabase as to what project ...
user25644's user avatar
  • 1,089
2 votes
2 answers
2k views

Enabling/disabling parameters based on Conditions/Preconditions in ModelBuilder?

I have been working with ModelBuilder and I am having trouble placing a precondition on an input parameter. However, I may be going about it in the wrong way and may just need a Python script. My ...
user1898629's user avatar