0

Because of my thesis layout requirements, I have to rotate 270° some of my maps in composer.
There are (many) svg smbols (icons), and they are rotated as well.
I would like to (non-)rotate them in order to keep them upright, so one doesn't have to continuosly rotate the page or the neck ;)
Is there a way to do that? Note that I would like to do it on the composer stage since some of my maps are normally placed north-south. Thanks for the attention!

2
  • See this closed question gis.stackexchange.com/questions/27149/…
    – Mapperz
    Commented May 7, 2013 at 15:23
  • thanks, but maybe I didn't explain well my problem: I use the same layers in different layouts, some with the "global", rotated, map and some with portion of the global map in the original orientation. so in the global map the symbols have to be rotated, but not on the "portions". Commented May 7, 2013 at 21:06

2 Answers 2

0

Here's an approach which would work in QGIS 2.2 and above. You can set a data defined rotation on the symbol which matches whether the map is being rendered in a specific composer map or to the main map canvas - this is done using the '$map' variable. $map will be 'canvas' for the main window, or a map item's id if it's being rendered in a composition.

So, to begin, set the map item's id to something like "rotated_map_01": enter image description here

Then, in your layer's symbol properties, click the "Data Defined Properties" button: enter image description here

Check "Angle" and click the expression builder button. You want to enter an expression along this lines of

CASE WHEN $map LIKE 'rotated_map%' THEN 270 ELSE 0 END

enter image description here

This expression will return 270 if the map item's id begins with "rotated_map_", or 0 otherwise. So, in any composer maps with an id "rotated_map_01", "rotated_map_02", etc the symbol will be rotated 270 degrees!

1
  • Thanks for the answer. Unfortunately I didn't use QGIS anymore (finished my thesis and still have to find a job :( ) but this method will come in handy when I'll use it again! Commented Jul 23, 2014 at 16:33
0

I think that what you could do is create 2 different layers of points.

One for the Global and one for the portions

If you do that you should be able to independently rotate the svg icons by double clicking the icons on the layers panel and then doing the same thing within the properties panel and selecting the rotate to the desired angle.

This might be achievable if you separate the two data files in excel and saving them as a CSV file

1
  • Ok, so the short answer is I can't do it. thanks. The problem with your solution is, if I want/have to change something in the symbols, I have to do it twice. Commented May 9, 2013 at 14:31

Your Answer

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

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