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!!!
Solved! Go to Solution.
If you don't apply a false expression, you get NoData, so this will work:
Con("Parcels" == 2, "Landuse")
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
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)
If you don't apply a false expression, you get NoData, so this will work:
Con("Parcels" == 2, "Landuse")
Thank you for all help!!!