I'm trying to fix broken sections in navigation data in QGIS. I have a model that cuts out broken sections of a point layer and inserts new points according to a line layer that I added earlier. The attached image shows how it looks like.
These new points have yet no attributes. Important are the attributes
"time". I need a consistent layer with consecutive points. My idea was to merge these point layers and then numerate through these fields ordering by x and/or y. I'm not sure however how the expression would look like as I'm still just diving into the world of expressions. For now I create an attribute which sorts the merged layer by $x, however I assume it will create problems when processing a line which runs in an opposite direction:
array_find( array_agg($id, order_by:=$x), $id) +1
The direction of movement changes from line to line, so I'm not sure how I can implement that in the expression. The information is scarse and very fragmented with bits to be found from different youtube videos or documentations. But its all only mildly related topics. Or is there a better way available?
Further what remains unclear to me is how do I deal with the
"time" attribute as it seems to be not quite easy to iterate through time. I tried following approach:
array_find( array_agg(( array_min("time") + make_interval(seconds=0.5)), order_by:="sort"), $id) +1
which, in my imagination would find the least time in the layer and then walk down the sorted attribute, adding 0.5 seconds (recording interval) to each next step. That expression seems invalid though and I cannot make it work.