I have a raster file that I would like to use to perform an inside clip on another raster file. I have tried using the extract by rectangle tool, but it gives me values ranging from 3.40282e+038 to -3.40282e+038. I have also tried to export the file using the selected graphics option, but the option is not available when I try and select it.
I am trying to get an average NDVI value for an area while discounting all of the water areas. I was directed to mask out water areas by:
- converting everything to NumPy matrices;
- reclassifying all water in the NLCD raster to 0 and all other pixels to 1;
- multiplying that resulting raster by the NDVI value raster;
numpy.sum(new-ndvi) / numpy.count_nonzero(new-ndvi)to get the average NDVI value of all non-water pixels.
However, when I try and convert the 13.5 MB NLCD raster to an array using this:
myarray = arcpy.RasterToNumPyArray('Z:\GISDataWarehouse\Land-Cover\LandCover-WI\landcover-wi.tif')
I get the error
Runtime error <type 'exceptions.MemoryError'>
Thank you for your help!