Hi all,
I am trying to understand no data values in ArcGIS rasters and how to effectively and efficiently handle them when generating numpy arrays.
For example, I have an arcgis raster and the no data value is set to 3.4028235e+38. When I try to convert the raster to a numpy array, I use the following:
nodata = 3.4028235e+38
arr = arcpy.RasterToNumPyArray(img, nodata_to_value = nodata)
However, this does not result in the nodata values being nan in the new numpy array. I think this is because arcpy creates numpy arrays as float32, and the no data is outside that range. Is this correct?
If so, what is the most efficient way to handle no data values in arcgis when converting to a numpy array? I hope it is not reset the default nodata value.
Thanks for any information.