2

I have a geological map and I want to represent the geology of a new 100 km road. The 100 km fit well in a (for example) 1:250.000 scale map, but I want to represent it at a 1:25.000. In map composer the coverage layer is my (for example) road.shp. The idea is that the different sheets follow the road (and rotate) all time. The number of sheets should be fixed by the scale (in that case, 1:25.000), but if you want to change the scale this numbers should change. The attached picture shows the result of the “grids for atlas plugin -> Generate dynamic grid”. It’s a very close result of my propose but no rotation in the grid.

How can I prepare a coverage layer as much automatic as possible where the rotation is defined by the road and the scale is defined by “scale” in map 0?

(As I did manually in the second screenshot)

enter image description here

enter image description here

I'm trying to prepare atlas following a line or a rute. I follow the instructions of How to create a customizabe table in QGIS Print Composer? but there are two problems:

  1. The map follow a line but do not rotate. The north is always up.
  2. The scale varies from map to map and it's determined by the number of segments (created with v.split.length tool) of your line but not controlled in map composer -> main properties -> scale.

Any solution ?

  • 1
    Are you sure that you are talking about the same question and answer that you linked to, and which I expanded? In any event, other than providing a link to a question and/or answer as background I strongly recommend that it does not form part of your question. Potential answerers are likely to be far more attracted to questions where they can simply read what you tried and where you are stuck. – PolyGeo Oct 28 '15 at 11:58
  • Edited and explained – César Herrera Oct 28 '15 at 15:07
1

If you use a recent version of QGIS you can use data-defined expression to define both the scale and the rotation in the composer.

But the part that will still rely on you is that you must somehow add two columns to the atlas layer and calculate the right value for each feature in you atlas layer. Let's call theses columns "col_scale" and "col_rotation".

Once you have done that go in the composer and do the following:

  1. On "Item properties" tab for your map, make sure that "Controled by atlas" is checked

  2. On "Atlas generation" Select the coverlage layer you just prepared

  3. Get back to "Item properties" tab you now should be able to do the folowing:

    • Select the drop-down button right to the Scale and select: fields > col_scale
    • Select the drop-down button right to the Map rotation and select: fields > col_rotation

Now everything should work as planned, if unlucky you'll maybe just have to refresh composers or/and the atlas preview button (desactivate/activate).


Optionally for the geeks among us:

You might also define every scale and rotation "on the fly" by using expressions at step 3 instead of existing columns and enjoy your own fancy algorithm ;)

  • After rereading your question I wonder if it's useful to use data defined scale, maybe data defined rotation is enough and check-box from I mentioned at step 1 can handle the scale. You must test that with your data I guess. – MarHoff Oct 28 '15 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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