I have a layer with multiple objects from where I want to list up the tables with a printoutput for each object. Some of the object are close to each other and therefore the tables of the objects collide on the output. Until now my solution is to split up the layer to several layers (by an unique ID I´ve given them). This I´ve been forced to do especially when handling conflicting objects that you can´t manage by setting the "Margin around feature". Look below.

Is my solution the best way doing it?enter image description here

  • I'm not sure if I understand your question. Are you using atlas for on each feature? or for a group of features with a same ID? What exactly do you want the table to show? A single row for the atlas feature? or all the rows with a certain ID. A screenshot of the a composer with the table would help. – Alexandre Neto May 7 '14 at 8:49
  • Atlas on each feature yes. I want the row linked to the object shown. But when other objects that are positioned next to each other, I´ll get those tables as well in the output. The solution with the ID´s just my way in handling them when conducting "Split vector layer".( The purpose of the ID´s is so I can spread the objects away from each other, separated in layers.) But that´s not the easiest way doing it, I think. – CARTOS May 7 '14 at 9:35
  • Are you using an attribute table in your composition? – ndawson May 7 '14 at 11:22
  • Yep I am. Most of my outputs comes out fine, but those objects that interfears in my map-window with my centered object also includes their tables. Thats why I manually are splitting up my layer based on the location next to each other. – CARTOS May 7 '14 at 11:46

If you want to use table attribute item, you can now (QGIS > 2.2) filter the display of features according to the atlas coverage feature, and this will also filter the composer attribute table item during output or atlas preview.

  • In the properties menu of your layer, you need rule-based method to style the layer that you want to show the attribute table;
  • Set a top rule as contains( $atlasgeometry, $geometry);
  • Add a new style or styles using the + sign, and drag them on top of the first rule.

enter image description here

And you are done, now the atlas output will filter the display of features that are not inside the atlas feature, and the attribute table won't list them either.

This works well if you want to list the attributes of several features in a different layer than the atlas coverage layer.

Note: Your layer will look empty in the QGIS map canvas, but it will work well in atlas output and preview.

Another option is to use labels instead and print the atlas coverage feature attributes using the following expression'My Field Name: ' || [%myfieldname%].

  • That's not a solution that helps unfortunately. But thanks. – CARTOS May 8 '14 at 10:01
  • I guess I can't really understand your question. – Alexandre Neto May 8 '14 at 11:35
  • Hey Alexandre. I think you´ve got it almost right. As far as I read in your text above I understand it as if I were working with more than one layer? I want do it with one layer if possible. – CARTOS May 8 '14 at 13:00
  • I believe you can use this with an unique layer, I have just stated that this method is good when you want list atributes from a second layer. I will try to update my answer to improve the Label option that I think it is what suits you better. – Alexandre Neto May 8 '14 at 16:30

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.