10

I would like to add a custom table to a map layout created in QGIS. I would like a fair bit of control over the look of the table (borders, background colours of the cells, etc.), and it appears that the "Add Attribute Table" tool doesn't let you control those things. I tried created what I wanted in Excel, and saving as an image, but of course it's pixelated. I would like a vector-based solution if at all possible. Any thoughts?

I considered creating an .html table, and inserting that; is this the best method?

underdark
  • 84,148
  • 21
  • 231
  • 413
Darren Cope
  • 6,616
  • 2
  • 32
  • 47
  • Which QGIS version are you using? Adding a HTML table and also basic styling of attribute tables is possible in QGIS dev. – Curlew Aug 13 '13 at 13:37
  • Sorry, forgot to mention that I am using QGIS 1.9.0-Master. I am aware that I can add .html (that's why I mentioned it) but was curious if there's a better/easier way. – Darren Cope Aug 13 '13 at 15:41
  • Have you considered exporting the map elements to SVG and doing the customization in something like Inkscape? QGIS has a plugin that will export all your mapping elements, includin the set styles to an SVG file. You can have full control of the look in InkScape – Ryan Garnett Aug 13 '13 at 18:55
  • @RyanGarnett; Yes, I have tried working in Inkscape, but for some reason it is just painfully slow on every computer I've ever used (including this one, which is quite well-equipped.) It just wasn't worth the frustration. Any good tips for SVG that make it actually usable? – Darren Cope Aug 14 '13 at 15:03
  • Darren that is really strange. What OS are you using? I have used Inkscape on many Windows machines with great success. Its hard to give specific pointers without knowing all the things you are hoping to do. But the SimpleSVG plugin for QGIS really helps for the export. One thing that is critical is working in layers. That way you can visually turn off large layers, which may help the performance issues you are seeing. – Ryan Garnett Aug 14 '13 at 15:20
  • Thanks @RyanGarnett. I'm on a Windows7 machine, 64bit dual-quad core i7 with 8GB of RAM. I tried the SimpleSVG plugin, but it of course doesn't work with the 'new symbology' options, which my map is using. – Darren Cope Aug 15 '13 at 12:01
  • That is really strange. I'm sorry it isn't working. – Ryan Garnett Aug 15 '13 at 13:04
  • @RyanGarnett no worries. I have had bad luck with Inkscape, and think I just need to dedicate more time to figuring it out! It's likely user error :) In the meantime, I was able to create the table how I wanted it in Excel, then create a high-res image of it which I inserted into my QGIS composer layout. Not ideal, but worked for this job. – Darren Cope Sep 05 '13 at 14:12
  • I have had to do that too, like you said not ideal, but it gets the job done. – Ryan Garnett Sep 05 '13 at 14:20

1 Answers1

1

If you will no longer touch the map, save for some texts probably, you can export as pdf, then open THAT in Inkscape. PDFs are much more manageable.

Exporting your table from Excel as pdf will also bring it in smoothly in Inkscape.

In a previous project, I had to meticulously layout, through Inkscape, a map with pointer labels in strategic spots of the map. I used SVG since I also needed to twist some text, change some coloration, coordinate opacities, tidily save everything into an exact paper size for integration in the report. For every inkscape project, I would have a layer called "white blocks" to cover-up the extra-renderings from the QGIS SVG output.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
wearashirt
  • 271
  • 2
  • 10