The Goal
My goal is to plot archaeological profiles with the QGIS Atlas. Here as an example the plan for the Profile 100.
The way so far
I have detached the profiles from their original positional reference, 'rotated' them (Z value placed on Y-axis) and lined them up one after the other to get elevation data of strata, but also to be able to print the profiles together. The result can be seen in the main map (and the overview map in the upper left corner). As a result, there is a large spatial distance between the original and the 'artificial' position reference of the profiles. The implementation in the atlas is simple.
Problem and Approach
I am having problems with the map Lage in the upper right where I want to show the profile in its original location reference. My approach is to use the spatial distance of the two representations of the profiles. To do this, I wanted to place a point on both the green line representing the profile in plan view and the ortho image of the profile showing the profile in front view. Then merge these two points into a feature. Then bound the map extent of each map to a predefined range. When I select a feature in the preview atlas, the atlas should zoom to the feature, but only if the feature is within the predefined range. This means that the map Lage should than show the profile in plan view (green line) and the main map should show the ortho image of the profile in the front view.
Potential Solution
Therefore I am looking for an expression to do a data defined override for the extents of my layout maps. The boundary for the main map should be between x_min >= 0 and x_max < 1000 because this is the range where the ortho images of the profile are within. The boundary for the map 'Lage' should be between x_min >= 390 000 and x_max < 400 000 (original position reference in UTM 33). I hope to split the search for the feature with the override.
The Question
I have already tried quite a lot, but unfortunately I lack the experience. Does anyone know a solution?
Maybe there would be the possibility to link the map Lage with the line layer (green line in the map Lage) to the atlas? The attribute 'profile number' is present in both the point layer, which I use as coverage layer, and the line layer.


