I am trying to re-project a file to a uniform grid EPSG:4326 and for that I am using the command:

gdalwarp -t_srs EPSG:4326 -srcnodata -32767 HDF5:"LC08_L1TP_029037_20190611_20190611_01_RT_L2GEN_2.nc"://geophysical_data/Rrs_655 warped4.tif

The gdalwarp changes the pixel values so I decided to use the gdal_calc however, the gdal_calc adds extra values to the tiff file. The command thet I am using is:

gdal_calc.py -A warped4.tif --type=Float32 --outfile=recalc4.tif --calc=A*0.000002+0.05 --NoDataValue=-32767

The files are: 1. NetCDF file before re-projection: https://drive.google.com/open?id=1XKNOqf_-MIcgR-f_qBWP-92ZNP3pEsgj 2. The warped4.tif file: https://drive.google.com/open?id=1HDlU5JIyubNQrYo91r8C_hEw8NTdAUqi 3. The recalculated file: https://drive.google.com/open?id=1eFyn5AnQf6FpkNkclhcSsSC-Mm8j5Rs8 How can I retain all the pixel values from the NetCDF file to the re-projected file?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.