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:

 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?

  • 1
    You scale the full range of int16 into full range of 8 bit. Think again and have a new try with scaleParams=[[data_min, data_max, 0, 255]]. Min and max of source data you can find with gdalinfo -stats.
    – user30184
    Aug 10, 2020 at 17:47
  • You are right. Thank for your reply.
    – FandaK
    Aug 10, 2020 at 19:06
  • Write your solution as an answer.
    – user30184
    Aug 10, 2020 at 23:06
  • 1
    I used the np.min() and np.max() functions to find the data_min and data_max from the arrays, and thus determine the appropriate range of UInt16 values.
    – FandaK
    Aug 12, 2020 at 19:41


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.