Relating two rasters

704
4
Jump to solution
12-14-2017 04:37 PM
Rumba1Nma
New Contributor II

Hi, I want to relate two rasters, one that I created by CellStatistics of different rasters, the other is NDVI values in pixel values ranging 0 to 255. What way can I do that? I tried reclassifying the raster but getting errors such as  OutReclass = Reclassify(inRaster, remap, "NODATA"), Reclassify missing values and result = wrapper(*args, **kwargs). Pls helpMy code

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

did you get a result for inRaster?  just stop the script after that line (comment out the rest of the lines) and provide a snapshot of the resultant table since it should be integer.  Once you have a table for reclassification, you can proceed on with there since the error message suggests that you haven't revealed all that is in the table/raster

View solution in original post

4 Replies
DanPatterson_Retired
MVP Emeritus

did you get a result for inRaster?  just stop the script after that line (comment out the rest of the lines) and provide a snapshot of the resultant table since it should be integer.  Once you have a table for reclassification, you can proceed on with there since the error message suggests that you haven't revealed all that is in the table/raster

Rumba1Nma
New Contributor II

Dear Dan,

Thanks for the response, I modified my code a bit, but still getting

errors.It runs fine untill line 18 because it print 4, which is my number

of raster in the input.

How do I proceed further? And once I reclassify, what tool can I use to

overlay reclassified on NDVI raster to display the relation?I am attaching

the snap of

code and errors.Thanks much

0 Kudos
DanPatterson_Retired
MVP Emeritus

Use code formatting rather than screen grabs in case someone wants to replicate the code.

From Cell Statistics I don't think it is getting a list of rasters... examine the code example,  putting something into a list doesn't make it an object, make sure that the raster actually lists, it should be added to the list using the raster layer name or the source raster from disk

Rumba1Nma
New Contributor II

Thank you Dan, makes sense. 

0 Kudos