I am attempting to do a conditional reclassification of an NLCD land-use raster.
I specifically want to reclassify all developed areas (classifications 22,23,24) that are near a road (classification 21) into distinct new classes: "developed land near road".
My workflow so far using ArcMap has been:
- Extract the road class into a new raster using "Extract by Attributes"
- Convert that raster to point using "Raster to Point"
- Buffer around those points using "Buffer"
- Reconvert the resulting polygon back to a raster using "Polygon to Raster." This file has a single value for being within distance of a road and NA's otherwise/
- ...
- profit!
So step 5 is where I have trouble. I need to do some sort of a conditional reclassification on each of the 3 housing classes. In raster calculator I think I worked out that it needs to be of the form:
Con(IsNull("buff1_21_Buf60Rast"),"lu_1.asc",Diff("buff2_21_Buf30Rast","lu_1.asc"))
I'm suspecting that I will need to run it sequentially for each of the 3 housing values. But I'm not really sure how or which of the logical math operators to use.
Thoughts?
Answer
Keep the entire operation in raster, no need to convert to/from vector.
This uses ArcGIS 10 raster calculator syntax and assumes that your minimum distance is 50 "units" and your output landuse class is "234":
Con(InList("landuse",[22,23,24]) * EucDistance(Con("landuse" == 21,1), 50), 1)
This will give you a single value of 1 where landuse is 22,23 or 24 within 50 units of road (21) and NoData everywhere else. You can then combine that with your original landuse with something like:
Con(IsNull("near road raster"), "landuse", 234)
You could probably combine that into a single step, but I didn't try.
Note: ArcGIS <= 9.3x syntax will likely be different. For example, I remember that Workstation GRID and older Spatial Analyst syntax is "IN {22, 23,24}" instead of "InList(22,23,24)"
Edit: And you can do it in one hit with:
Con(IsNull(InList("landuse",[22,23,24]) * EucDistance(Con("landuse" == 21,1), 50)), "landuse",234)
No comments:
Post a Comment