Raster extraction

865
6
06-11-2010 03:52 PM
WesKing
New Contributor
ArcInfo v9.3.1 sp1
Having a DEM ranging from 2500 to 3500 I would like to create 2 separate DEMs; 1 ranging from 2500 to 3000 and the other from 3001 to 3500.  Which tool would work best to create these DEMs using statements such as [DEM] <= 3000and [DEM] >=  3001.  I don't want a conditional return like I get in Raster Calculator (maybe I'm doing doing it wrong though).  I want the true values returned with all other pixels not satisfying the statement to be NoData.

Thanks in advance.
Wes
0 Kudos
6 Replies
WesKing
New Contributor
Dan/William,
Thanks for the advice. 

Dan, I don't think SetNull will work because it requires an integer type for the input conditional raster.

William, Sorry but can I ask for some clarification on your advice?  Set the extent where?

Thanks,
Wes
0 Kudos
JeffreyEvans
Occasional Contributor III
You are not correct in your assertion that SETNULL requires an integer raster. If I understand your post, what you want to do is as simple as the following raster calculator statement:

SETNULL([dem] >= 3001, [dem]) 
SETNULL([dem] <= 3000, [dem]) 

You can also define an embedded range (i.e. 2800-3200) using SETNULL.

SETNULL([dem] >= 2800 & [dem] <= 3200, [dem])
0 Kudos
WesKing
New Contributor
Jeffrey,
Thanks for the input...worked great!  So you're right about not requiring an integer raster.  See the attached though, using Set Null in Conditional tools states that an integer raster is required.  Either way it worked and thank you very much.  I'm still learning many of these tools and the syntax involved.  Without you guys I would just sit in the fetal position rocking back-and-forth, with an occasional scream from head pain.

William, I'm still interested in hearing a little more detail on your post (if you don't mind). 

Wes
0 Kudos
DanPatterson_Retired
MVP Emeritus
to all, I was reading the 10 help files
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z00000007000000.htm
which indicates

The input conditional raster does not affect whether the output data type is integer or floating point. If the input false raster (or constant value) contains floating-point values, the output raster will be floating point. If it contains all integer values, the output will be an integer raster.

which I didn't compare to the 9.3.x help files, if that clarifies, with Bill's cavaet about range issues.
0 Kudos
WesKing
New Contributor
Thanks again to both of you.

And yes you're right about being meticulous with the range values.  I had noticed I written it incorrectly in my first post, even though I wasn't going to be using those exact numbers for my ranges (sloppiness in my posting).  I just finished running Raster Calculator a couple times because I hadn't used the correct operator (> as opposed to >=) to make sure I covered all values.

I'm sure I'll be back soon.

Wes
0 Kudos