2

gdal_translate has the option -exponent <exp_val> to use in conjunction with -scale that will

apply non-linear scaling with a power function. exp_val is the exponent of the power function (must be positive).

This describes what the function does at the mechanical level but not why or when it might be a good idea. What are appropriate scenarios to use this feature? How is it useful and what does it accomplish?

2
  • 1
    It just does that I guess. Here's an example of someone using: medium.com/planet-stories/… Jul 12 '21 at 22:26
  • 1
    It depends on what you want to do, I'm not sure there's a general answer to this question...? Just as an example (though I didn't use GDAL, but ArcGIS), I've used a power function to generate a cost surface from a habitat degradation surface for input to a least-cost path analysis (so cost increases very quickly compared to degradation)
    – user2856
    Jul 12 '21 at 22:30
0

Suppose you have ndvi data. Most of the time the data will fall in the range of -0.5 to 1.0. If you don't need much precision and want to compress the data size, you can scale the original data using MinMaxScaler and save it in Byte format. You can then save the scaled parameters in the scale and offset tags to revert to the NDVI values later.

1
  • 1
    You seem to be referring to the -scale parameter which applies a linear scale, rather than the -exponent parameter that the question is asking about, which (in combination with -scale) applies a non-linear power scaling function.
    – user2856
    Jul 13 '21 at 7:36

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.