I'm very new to raster manipulation, and I'm getting a nodata value of -3.4028234663852886e+38 when importing USGS NED 1/3 arc-second n41w074 1 x 1 degree IMG using rasterio on Python.

  1. What is it with this number? I understand that it's some minimum bound of a 32bit float, but why is this number so common in raster data? Why not just, say 0, or -999 or something less extreme?

  2. Is it a problem? How to deal with it? Google provides little answers about why. There is one thread that kind of deals with this but it focuses on how to solve it using QGIS (not my case) or preprocessing with GDAL. I've seen a few posts of using a mask, which I understand inherits from numpy masks and conceals the numbers for the purposes of calculations, etc.

I'm trying to merge two rasters and I'm getting the wrong results (as is clear in the bottom figure) so I'm thinking it might be related to this.

Raster 1 Raster 2 Merge result

What should I do?

  • 1
    Regardless of the value it takes up the same amount of space in the raster dataset. Esri likes to set the nodata to the minimum (or maximum) value of the datatype when data is processed and as Esri arguably has the lions' share of the GIS market it may be in homage to that pseudo standard. When choosing a nodata value it's best to pick one that will never appear in the data as a genuine value, -9999 works well as does -29999 but all that matters in the end is that the value is outside the potential range of genuine values. Jul 9 '19 at 22:43
  • 3
    Please Edit the question to focus on the actual problem, not the false NODATA value issue ("weird results" is not sufficiently detailed).
    – Vince
    Jul 9 '19 at 23:00
  • 1
    Fair enough, this is really two questions in one. Should I delete and partition?
    – xv70
    Jul 10 '19 at 1:36
  • Delete and repost is a way to get your account locked by automated defense mechanisms. Instead Edit the question to focus on your analysis error. Your graphics are confusing, since there doesn't seem to be anything wrong. You should probably review the statistics of the new image if you want it displayed just like the old ones.
    – Vince
    Jul 10 '19 at 11:46