Is there an easy solution for recording events for a line crossing borders of zones in a polygon layer? I need to implement this in python using QGIS, thus pyqgis. The image attached illustrates what I am looking for. The red line is a linestring geometry with start and end point. Whenever the line enters a zone (i.e. crosses the polygon border) an event is recorded being the reference of the zone (A to D) and the distance from the start of the line, measured along the linestring's geometry (distances in the image are estimates only). I can get by the first "event", where the line already starts inside zone A. But is there an easy way to get the other events? I could cut up the line in segments using the zones, but my goal is to record events to prepare for linear referencing, so I try to avoid cutting up the line.
Thanks.
أكثر...
Thanks.

أكثر...