I'm investigating the danger of rockfalls into lakes in mountainous areas by using the hydrological tools of ArcGIS 10.7. My problem is that rockfalls don't exactly behave as surface runoff would.

I will try to explain using my crude picture below: My lake is to the right with the light blue outline. The colored areas are slopes with different hazard classifications that possibly drain into the lake.
The dashed line approximately divides these slopes into those, from where a rockfall would hit the lake and from where only runoff water would reach it.

I'm trying to figure out an automated approach to select only the slopes to the right. I have an idea but I don't know if this is possible with ArcGIS:

I would calculate the aspect for every slope pixel and create a line feature according to the aspect value. Then, I would buffer this line with for example 50m and see if it intersects with the lake. This way, I would identify the slopes where more than a certain percentage of pixels somewhat directly point towards the lake.

Now my question: Is there a way to create a line in arcpy with only a pixel location as origin and an aspect value for direction?

  • 1
    I believe you need two points to generate a line. However, if you know the direction of the line, you can calculate the endpoint of a line with some basic trigonometry if you assume a fixed length (e.g. 100m).
    – Fezter
    Feb 27, 2020 at 5:24
  • Of course! Thanks a lot, I will try that! If you post your solution as an answer, I could accept it. Feb 27, 2020 at 11:39

1 Answer 1


Florian is correct that you could generate lines, and the the tool to generate the lines would probably be using arcpy Geometry class methods.

This may be too slow however, if you have some raster chops, ArcGIS Pro 2.5 supports a new Raster Cell Iterator to work with raster neighborhoods.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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