Raster elevation calculation

3443
13
Jump to solution
05-27-2018 10:17 AM
PhilippWickey
New Contributor II

Hello,

I have forgotten how to express in the Raster Calculator, that I want elevations " 35m through 100m" from a raster.

Any help is appreciated, also if there is an example reference guide somewhere, please feel free to share.

Thanks

Phil

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

Did you 'type' the expression? Always select the grid from the list of layers and variables, then select the operands and numbers like on a calculator.  In that way, the expression will be correct.

Try

Con((bells >= 3150) & ( bells < 3400), 1, 0)

no typing... except for the grid name... and try a *.tif in a folder rather than a geodatabase (ie c:\GISwork\...\rast6.tif

View solution in original post

13 Replies
DanPatterson_Retired
MVP Emeritus

("Elev" > 35) and ("Elev" < 100)

or whatever... you grid AND you must reuse the grid's name for both conditions, you can't do "Elev" > 35 and < 100 

0 Kudos
PhilippWickey
New Contributor II

Thanks!

0 Kudos
DanPatterson_Retired
MVP Emeritus

Philipp, no problem... but if it works, mark the question answered so others will know a solution was found

0 Kudos
PhilippWickey
New Contributor II

I wish I could say it worked, but it did not. I tried a few other options like using "&" etc., but did not find a combination that worked. I also tried the instructions in the link you provided. Thanks again. (p.s. the other two rasters are just simple queries made from "bells" < 3000 and "bells" > 3500.  "bells" is a DEM just to clarify.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Did you 'type' the expression? Always select the grid from the list of layers and variables, then select the operands and numbers like on a calculator.  In that way, the expression will be correct.

Try

Con((bells >= 3150) & ( bells < 3400), 1, 0)

no typing... except for the grid name... and try a *.tif in a folder rather than a geodatabase (ie c:\GISwork\...\rast6.tif

PhilippWickey
New Contributor II

I did not type the expression (except for the word "and" and the commas)

0 Kudos
PhilippWickey
New Contributor II

That worked! The formula looks like the following:

Con(("bells" >= 3150) & ( "bells" < 3400), 1, 0)

Very happy, thanks!

0 Kudos
PhilippWickey
New Contributor II

I have not attempted this yet, but I will now need to multiply this .tif with a slope, aspect and one other raster. Do you foresee any problem multiplying a raster and a .tif? Thanks again!

0 Kudos
DanPatterson_Retired
MVP Emeritus

A *.tif is just a form of raster.

What you have to worry about is making sure that the extent, cell size and snap raster are set BEFORE you begin any raster work.

This is done in the Environments tab of any tool in the spatial analyst tools.

It is easy to get results.... it takes work to get proper results

0 Kudos