My main goal here is to end up with a shapefile that simply defines the ridgeline in a given area. I followed the directions at How To: Identify ridgelines from a DEM and am having some trouble. Firstly I went through every step exactly as it is shown on that page, and ended up with a shapefile that defined almost every cell in the raster as "ridgeline." I went back through in order to diagnose where I went wrong. What I found was that in the step where you invert your filled DEM, the resulting raster has all negative values for elevation. I modified the equation in the raster calculator to be:
(("Rasterlayer" - Max_value) * -1) + Min_value
This made it so that my inverted and filled DEM had positive values. I threw the two DEMs (inverted and not inverted) into arcscene just to check my sanity and yes, the new inverted DEM showed valleys where previously there were ridges. All made sense.
However, when I then move on to the flow direction tool, I get weird results. I specify the new inverted DEM as the input, and choose to save the output as the same name plus "flow_dir" somewhere in the name. I checked the box to make the edge cells flow outward, and I left it at D8, which is what I wanted. In theory, this should give me a raster where the cells are defined as one of 8 discrete values, 1, 2, 4, 8, 16, 32, 64, & 128. In practice, however, I get a raster that has not 8 discrete cell values but 208 discrete values, from 1-208. What have done wrong here and how do I fix it?
It should be of note that when I run the original filled DEM (non-inverted) through the flow direction tool with the exact same parameters, it spits out a raster that has the expected 8 discrete values. The screen grab here shows the raster that I get with 208 values (Flow_dir_7) which is not what I want but was resultant of using the tool on the inverted DEM. As you can see, right below that is the Flow_Dir_5 raster which is defined by the 8 values as it should be for D8, however this raster was produced using the non-inverted DEM as the input.
Do you know where I went wrong or know another way to define ridgelines other than inverting my DEM and pretending they are streams?
I'm running Windows 10 and ArcMap 10.7.1.