One solution for this problem is to use the following command: gdalwarp -cutline path_to_shapefile tiff_for_cut output_tiff, however the pixels outside the bounding box are set to 0, but the desired one would be NaN (Not a number). With the increment of frag -dstnodata 0 in command, all values that would be 0 became 'no date' but still do not become the same as expected 'nan'.
One solution for this problem is to use the following command:
gdalwarp -cutline path_to_shapefile tiff_for_cut output_tiff
, however the pixels outside the bounding box are set to 0, but the desired one would be NaN (Not a number). With the increment of frag-dstnodata 0
in command, all values that would be 0 became 'no date' but still do not become the same as expected 'nan'.