1

I got a problem with setting an Atlas. I have a polygon layer with around 100 polygons, and a line layer.

What i need to do is to generate a map for each polygon and show on the fixed scale (1:500) those specified lines.

I configured atlas to generate those maps based on polygon layer, but when polygon is large, lines are not visible because atlas centering map to the centre of polygon. Is there a way to generate map centered to those lines?

Im using a "inverted polygons" as a style of Polygon layer becouse im showing only one specific polygon that im reffering to on atlas using "$id = @atlas_featureid" in expression.

Got some screenshots to show what is in my mind:

Screen 1 - Nicely generated map Nicely generated map

Screen 2 - Map generated in 1:1000 scale showing the problem and the boundary i would like to show while in 1:500

Badly generated map

Screen 3 - Badly generated map Map generated in 1:1000 scale showing the problem and the boundary i would like to show while in 1:500

3
  • 1
    First off if you want the line layer to be the subject of the layouts then you should use the line layer as the Atlas feature. Secondly, and I may be reading your question wrong so correct me if I am, it sounds like your layout simply won't be big enough for that line feature if it's set at 1:500. Dec 17, 2019 at 15:18
  • Can you add some details about this line layer? it's look like a raster with low definition or a dxf may be? Can you set a different style for you line layer? There is different line color, what about that? I don't understand precisely your problem. Do you want to show complete green polygon and those color lines in each polygons? Dec 17, 2019 at 20:02
  • I'm using polygon as a subject for layouts becouse i need to "gray out" everything around the featured polygon. I can also use larger scale but my line layer need to be centered on the layout. Basicly i got around 10 thousands polygons wchich are land lots and i need to show a fiber optic cable that's gonna go through them. Different colours on the lines are not important there. It's just 1 line layer with colours based on type of the cable. Dec 18, 2019 at 6:31

1 Answer 1

1

I don't know if I understand right your problematic, but for me, if I reword : you want to focus your atlas page on the section of the line layer wich is in the green polygons at 1:500 fixed.

You should try this :

  1. Go to Vector ‣ Geoprocessing Tools‣Intersection
  2. Set the process like that :

enter image description here

Parameters :

  • You Input layer is your line layer

  • Overlay layer is your polygons layer

  • Input fields to keep : inclunding you can set the attributes to your new table, and from both tables, it could be useful depending on the result, and ordering it.

For more details for this process check this : https://docs.qgis.org/3.4/en/docs/user_manual/processing_algs/qgis/vectoroverlay.html#intersection

You obtain a new layer : layer_line_interstec

  1. The result should be only the part of the object from the layer line which are in the green polygons. Moreover, if the polygons haven't always a line inside it will save you page in the atlas.
  2. Then focus your atlas on your layer_line_interstec and set it invisible, fixed scale.

What do you think?


I got another problem with that. On screen 1 you can see that there is only 1 visible polygon (green) because i use "inverted polygons", thanks for that i din't know about this function! as a style of Polygon. I should write that in the main post. That's why i used a polygon layer as my focus on atlas. Is there a way to also show only that one single polygon that I'm referring with my lines?

To show only a polygon crossed by a unique line you have to :

  1. Have a single identification for yours polygons e.g. ID
  2. In your intersection process you will join this ID in the layer_line_interstec, like this each segment of your layer have the ID from the polygon intersected by the line.
  3. Then set your style for your polygon layer like "ID" =attribute (@atlas_feature, 'ID')
4
  • Thank you for your answer, i tried this solution and it works nicely but i got another problem with that. On screen 1 you can see that there is only 1 visible polygon (green) becouse i use i use "inverted polygons" as a style of Polygon. I should write that in the main post. That's why i used and polygon layer as my focus on atlas. Is there a way to also show only that one single polygon that im reffering with my lines? Dec 19, 2019 at 8:15
  • Please valid the answer if it's suits you. Dec 20, 2019 at 5:14
  • Thank you very much. Works like a charm :) Dec 20, 2019 at 8:55
  • I'm glad to you, i hope you will have your works done for the holidays! Dec 20, 2019 at 9:40

Your Answer

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

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