2 followers Follow

how does EASI handle nan in rasters?

Can EASI recognize nan's in a 32bit float geotiff? My investigations indicate that opening a 32bit float geotiff in EASI results in the conversion of the nan's to zero. I need to be able to differentiate true zero values from nan's. Is this possible?

andrew meredith

Please sign in to leave a comment.



I am not sure about EASI's support of NANs, but this is well supported in Geomatica's Python API, which uses NumPy for custom raster processing. Furthermore, PCI will no longer be updating the EASI language going forward (with exception of supporting new PCI functions in future releases), so it is recommended that you consider switching to python in any case.

Here is how you can read in data with nan values in Geomatica's python API:

import numpy
from pci.api import gobs, cts, datasource as ds

# get the path to your .tif image with nan values
nan_file = r'D:\example\my_nan_file.tif'  

# create a reader object with the channels from the input file you want to read in
reader = ds.BasicReader(nan_file, [1]) 

# read the whole file
read_raster = reader.read_raster(0, 0, reader.width, reader.height)

# get the numpy array with the raster data
nan_chan =

I hope this helps.

Shawn Melamed 0 votes
Comment actions Permalink