SV: [GRASS-user] Vector map text legend
Martin Album Ytre-Eide
Martin.Album.Ytre-Eide at nrpa.no
Mon Apr 4 05:19:49 EDT 2011
Thank you for your suggestion. Unfortunately I don't know how to use qgis functions in python. I have had a look at it, and it seems tedious.
I ended up doing it with ps.map - it seemed I could use the .ps format anyway. I made a script which altered my ps.map file for each iteration - using the data.replace() function in python.
Fra: grass-user-bounces at lists.osgeo.org [mailto:grass-user-bounces at lists.osgeo.org] På vegne av Saber Razmjooei
Sendt: 1. april 2011 08:23
Til: Martin Album Ytre-Eide
Kopi: 'grass-user at lists.osgeo.org'
Emne: Re: [GRASS-user] Vector map text legend
How about using Grass Plugin in QGIS to load your vectors and create legend there? Not sure how it ties up with your python script.
On Thu, 2011-03-31 at 11:39 +0200, Martin Album Ytre-Eide wrote:
> I am looking for a way to make a legend to some vector area maps. The maps contain four different types of areas and are given different names.
> I have made a python script running d.mon, d.vect etc. with the png driver producing about 14 png files, which then is used to create a gif file.
> A way to create a vector legend is to do v.to.rast and use the d.legend from the "dummy" rast - however, I don't see how you can get a legend with text in this way? I don't think you can since raster should have numerical values. You could make a legend without category numbers and try to add the text with d.text, but I don't know if that's a good way of doing things.
> Then there is ps.map which solves this in a nice way - the problem is - I would like to keep the png format. I could just make the legend with ps.map - and add it to my png files with some image tools in python, but I am unsure of the result is worth the effort.
> Any other ideas to do this?
> Martin Ytre-Eide
> grass-user mailing list
> grass-user at lists.osgeo.org
grass-user mailing list
grass-user at lists.osgeo.org
More information about the grass-user