EAPA_2025 practice question 6 of 10

A GIS analyst is using the Raster Calculator to determine the best location to start a coffee tree farm. The soil should be deep sandy loam…

Full set: 75 questions

A GIS analyst is using the Raster Calculator to determine the best location to start a coffee tree farm. The soil should be deep sandy loam (represented by class code 5 in raster) or fertile volcanic red earth (class code 12). Temperatures should remain between 17.8 to 21.1 degrees Celsius (64 and 70 degrees Fahrenheit), and the area should get at least 60 inches (1.52 meters) of rain per year. Which expression should be used to produce suitable areas?

Answer options
A: (Precipitation>='60') & (Temperature ='64') &((SoilType='5') &(SoilType='12'))
B: ("Temperature" =64) & ("SoilType"=5) | (SoilType=12) &("Precipitation">=60)
C: ("Precipitation">=60) &(("SoilType"=5)|(SoilType=12)) &("Temperature" =64) Correct answer
Correct Answer:
C. ("Precipitation">=60) &(("SoilType"=5)|(SoilType=12)) &("Temperature" =64)
Explanation

In Spatial Analyst Raster Calculator Map Algebra expressions, boolean logical evaluation requires proper parenthetical grouping and appropriate logical operators. Option C correctly groups the target soil conditions using the OR operator | within nested parentheses (("SoilType"=5)|(SoilType=12)), enabling any raster cell to satisfy either soil class code 5 or class code 12. It then combines this grouped soil condition with the minimum precipitation threshold ("Precipitation">=60) and specified temperature criterion ("Temperature"=64) using the AND operator &. This correct operator precedence ensures that output raster cells meet all required environmental criteria simultaneously, whereas unparenthesized or incorrectly linked logical expressions produce flawed bitwise evaluations.

Why Incorrect

Option A is wrong because evaluating (SoilType='5') & (SoilType='12') requires a single cell to be simultaneously two different soil types, yielding zero results.
Option B is wrong because operator precedence without proper parentheses around the OR condition evaluates ("SoilType"=5 | SoilType=12) incorrectly across the adjacent AND conditions.

References

Esri Documentation, ArcGIS Pro Help: "Raster Calculator (Spatial Analyst)", Esri, 2024. https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/raster-calculator.htm

Esri Documentation, ArcGIS Pro Help: "Working with operators in Map Algebra", Esri, 2024. https://pro.arcgis.com/en/pro-app/latest/help/analysis/raster-analyst/working-with-operators-in-map-algebra.htm

Scroll to Top