Tuesday, 3 April 2018

arcgis 10.0 - Reclassifying only part of raster keeping rest unchanged?


I'm trying to reclassify only a certain part of a raster...not the entire raster. Here's the problem. I have a LULC raster of the entire US. There are some issues with the raster that I want to fix, namely some cells that should be water are classified as wetlands. These are mainly off the coast, not inland. However, some cells that are classified as wetlands should really be wetlands (mainly inland) and I don't want these to change. I plan on using a ZIP Code boundary file to determine which cells are considered "off the coast" and which ones are not. I have access to ArcGIS 10.1 and R with the appropriate raster packages I need so a solution in either software would be fine. Can anyone help me figure this out?



Answer



If I understand well, you have one class that needs to be changed only if it is located off the coast


So what you need to do is convert your ZIP code boundaries to raster (feature to raster): this will produce a raster that is Null (NoData) where you are not on inland.


Then apply a conditional statement in order to change your wetland values. In the raster calculator, this would look like this :


Con( IsNull("MyZIPraster") AND ("LULCraster"==wetland_value) , water_value , "LULCraster" )


where wetland_value and water_value are integer values of your class


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...