Geomorphometry.jl icon indicating copy to clipboard operation
Geomorphometry.jl copied to clipboard

Slope in "edge space"

Open rafaqz opened this issue 6 months ago • 2 comments

A lot of the work I'm doing at the moment is is graphs of the edges between pixels.

In these contexts you actually want the slope around a pixel as a length 4 or 8 vector. It might make sense to include some algorithms here that return the slope to all neighbors, rather than the center pixel slope?

Maybe it works for other methods too? We could then set a standard for where n/s/e/w etc are

rafaqz avatar May 06 '25 12:05 rafaqz

Wait, so instead of a weighted 4/8 stencil slope, this would be the difference between center, and south, center and north, etc? How would the resulting output look like?

evetion avatar May 06 '25 13:05 evetion

Yeah, like a raster of static vectors or a raster with a n/s/e/w etc dimension? both amount to the same thing in memory.

Making a graph from a flat raster we do this calculation anyway, we may as well just keep the edge connections in the raster and put them directly into the graph, and avoid the information loss from the weighted mean

(can of course do this directly with Stencils.jl but might be nice to formalise it a bit more)

rafaqz avatar May 06 '25 15:05 rafaqz