I am working on normalizing some rasters so that data taken on different days and calibrations can be seen in the the same relative view.
in gdal_translate the -scale option looks like this:
-scale [src_min src_max [dst_min dst_max]]:
so if I use the format
-scale src_min src_max 0 1
I get the result I am looking for now.
However I would like to use the option to not provide the src values and just use the input.
I am wondering if anyone could help me with the proper syntax for this, or if my best option is to just read out the src values before and then apply them in the script.
Best Answer
Thanks for all of the suggestions and help. The scale normalization is very useful when doing code, however in my case the original idea of putting the minimum and maximum in code looks like the only solution at this point.
I did not find a solution for doing it at the command line.
Here is a code snippet from the working solution: (Note that originally I was writing nodata to 0 as well, and this method breaks the nodata transformation. In my code I had to re-run the translate with nodata set to 0 as the only transformation to get it to finish the whole task!)