[GRASS-windows] grass.run_command issue for display a vector and its labels

Markus Neteler neteler at osgeo.org
Tue Nov 6 23:57:35 PST 2012


On Wed, Nov 7, 2012 at 12:49 AM, Glynn Clements
<glynn at gclements.plus.com> wrote:
> Liu, Huili wrote:
>> I am running an issue to display a vector and overlay its label on
>> the top by using grass.run_command
...
> If the environment contains the setting GRASS_PNG_READ=TRUE, d.*
> commands should overlay their output on an existing image. So the
> following should work:
>
> grass.run_command('d.vect', map='my_shape')
> env = os.environ.copy()
> env['GRASS_PNG_READ'] = 'TRUE'
> grass.run_command('d.labels', labels='my_shape_labels', env = env)

Added to the Wiki as
http://grass.osgeo.org/wiki/GRASS_Python_Scripting_Library#Display:_overlayed_map_display_with_labels

Markus


More information about the grass-windows mailing list