simsab-ufcg / ndvi-finder

This projects generates safe ndvi for landsat scenes
MIT License
0 stars 0 forks source link

cut rasters based on BR semi-arid sub-region bounding boxes #6

Closed thiagomanel closed 6 years ago

thiagoyeds commented 6 years ago

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'.

thiagoyeds commented 6 years ago

Solving with the following command: gdalwarp -cutline path_to_shapefile tiff_for_cut output_tiff -dstnodata -nan