NaN pixels are produced after doing DEM generation

please have a look at these two topics: