Extracting cells using a categorical raster with raster calculator

2882
4
Jump to solution
09-20-2015 10:23 AM
SusanneWagner
New Contributor II

Hello,

I have some problems for a raster query. Can somebody help me please?

I have 2 raster files: parcels with different id (1-7) and landuse also with different ids 1-4).

I want to use the raster calculator for query to create an own raster layer with parcel == 2 and including all kind of landuse (1-4) which exists on those parcels....

But I don't know how to form that query. I tried it with pick and con but without success.....

Thanks in advance!!!

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
curtvprice
MVP Esteemed Contributor

If you don't apply a false expression, you get NoData, so this will work:

Con("Parcels" == 2, "Landuse")

View solution in original post

4 Replies
DanPatterson_Retired
MVP Emeritus

Use the Combine tool which will produce all the unique combinations which is more useful that doing one query at a time.

http://desktop.arcgis.com/en/desktop/latest/tools/spatial-analyst-toolbox/combine.htm

GabrielUpchurch1
Occasional Contributor III

In addition to Dan's suggestion (which should do what you need), this map algebra expression applied in Raster Calculator should yield all of the land use cells that overlap with Parcel 2 cells:

Con("Parcels" == 2,"Landuse",SetNull("Parcels","Landuse"))

Alternatively, instead of setting all of the parcel cells not equal to 2 to NoData, you could simply set them to 0.  It just depends on your needs.  Here is that syntax:

Con("Parcels" == 2,"Landuse",0)

curtvprice
MVP Esteemed Contributor

If you don't apply a false expression, you get NoData, so this will work:

Con("Parcels" == 2, "Landuse")

SusanneWagner
New Contributor II

Thank you for all help!!!