I already posted a similar question a few weeks before. But since my dataset changed and I still havent solved it, I thought its good to post a new question instead of editing the old. Using ArcGIS 10.4
I am now working with a DEM. With the ArcHydro Toolbox I calculated subcatchments which I need for running a habitat model later. Now I need the maximum distance of every subcatchment to the source of the river (headwater).
I was thinking a tool like "path distance" or "flow length" should do the trick. And then maybe zonal statistics to calculate it for my subcatchments. But I cant get it right.
UPDATE: With Lovette's tip with the weightraster I finally got it done. But since my subcatchment are not 100% correct (I guess that is normal) and my pixels are a little big (I need 50x50), the results of the zonal statistics are then a little weird sometimes. In picture 1 you can see that the blue (larger distance) pixel pf the main stream also touches the subcatchment of the side stream. Because the zonal statistics always takes the maximum, the whole catchment of the small side river gets a distance value that is way too high. The side streams should always have shorter distances.
Any ideas what to do about that? Can I maybe give the subcatchments values manually. This would take me a while, but from the numbers it would be doable.