2

I have run a flow accumulation for a DEM that I'm working with. I'm trying to apply a log transform because I've heard it could give a better visual representation.

How would I go about doing this process.... Can this be done without Python?

  • Update: I've tried using the raster calculator, I keep getting a Python sytax error: Parsing error. – user26133 Apr 11 '14 at 21:42
  • What syntax are you using? – Aaron Apr 11 '14 at 21:46
  • Its a graduate school assignment, and the grad assistant made this comment "Map showing the watershed boundary, outlet, and the flow accumulation layer (try applying a log transform to the flow accumulation layer for better visual representation)" Log transformation refers to taking the logarithm of something. Like........ log(x) Here, you'd apply the same mathematical function to an entire raster layer via map algebra." I'm not sure what he meant by that. – user26133 Apr 11 '14 at 21:50
  • 2
    Because initial flow accumulations will be zero--which has no logarithm--some care is needed to get good results. Consider, for instance, adding 1 to all flow accumulations and taking the log of that. Mask this calculation with the grid of all non-null accumulations. The resulting grid clearly distinguishes reachable cells from non-reachable cells while still achieving the desired cartographic effect. Another viable option is to apply a Box-Cox transformation with small value, such as ([x]^0.1 - 1)/(0.1) + 0.1 (where "[x]" represents the grid). There will be no problem with the zero values. – whuber Apr 12 '14 at 20:55
2

You can perform raster algebra using the Raster Calculator (Spatial Analyst). The syntax would be like the following:

Float(Ln("flowAccumulation.img"))

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.