I am a beginner in the area of GIS and remote sensing image analysis. I am dealing with the satellite images from the **VNP46A1 Daily At-sensor TOA Nighttime Radiance Product. I want to get the TIFF images from the DNB_At_Sensor_Radiance_500m scientific dataset layer for further analysis.
I used the HDF to GeoTIFF convert script from NASA which I slightly changed. I need to reproject the images from the WGS84 to the S-JTSK coordinate system. The original arrays from which the images are produced contain UInt16 values. When I want to display the image, I got the black image. I need to convert them to the 8-bit images. In order to do this, I used the parameter scaleParams from gdal.TranslateOptions. However, I am still seeing the black image. Below is the part of the code that I used:
gdal.TranslateOptions(gdal.ParseCommandLine(translateoptions),
format='GTiff', height=2400, width=2400, scaleParams=[[0, 65535, 0, 255]], resampleAlg=gdal.GRA_Bilinear, outputType=gdal.GDT_Byte)
How can I solve this problem?
scaleParams=[[data_min, data_max, 0, 255]]. Min and max of source data you can find withgdalinfo -stats. – user30184 Aug 10 '20 at 17:47np.min()andnp.max()functions to find thedata_minanddata_maxfrom the arrays, and thus determine the appropriate range of UInt16 values. – FandaK Aug 12 '20 at 19:41