grass-windows Digest, Vol 64, Issue 3

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

grass-windows Digest, Vol 64, Issue 3

grass-windows-request
Send grass-windows mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.osgeo.org/mailman/listinfo/grass-windows
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of grass-windows digest..."


Today's Topics:

   1. Re: grass_width, grass_heigt and grass_pngfile (Markus Neteler)
   2. RE: grass_width, grass_heigt and grass_pngfile (Liu, Huili)


----------------------------------------------------------------------

Message: 1
Date: Sun, 4 Mar 2012 10:22:09 +0100
From: Markus Neteler <[hidden email]>
Subject: Re: [GRASS-windows] grass_width, grass_heigt and
        grass_pngfile
To: Glynn Clements <[hidden email]>
Cc: "Liu, Huili" <[hidden email]>, "[hidden email]"
        <[hidden email]>
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Mar 3, 2012 at 5:15 PM, Glynn Clements <[hidden email]> wrote:
> Liu, Huili wrote:
>> I am trying to create a python script to get an image file as below:
...
>> But I got the default image file name,  map.png with GRASS_WIDTH=640 and GRASS_HEIGHT=480.
>> Is there any way for me to setup  width and height and my image file name in grass.run_command?
>> I searched the doc for a while but I still can not get a correct syntax.
>
>        import os
>        os.environ['GRASS_PNGFILE'] = filename
>        os.environ['GRASS_WIDTH'] = str(width)
>        os.environ['GRASS_HEIGHT'] = str(height)

Added in rudimentary form to the Wiki page:
http://grass.osgeo.org/wiki/GRASS_and_Python#Controlling_the_PNG_display_driver

(feel free to improve there, just requires registration in the Wiki)

Markus


------------------------------

Message: 2
Date: Sun, 4 Mar 2012 13:18:38 +0000
From: "Liu, Huili" <[hidden email]>
Subject: RE: [GRASS-windows] grass_width, grass_heigt and
        grass_pngfile
To: Markus Neteler <[hidden email]>, Glynn Clements
        <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="us-ascii"

It works. Thanks Markus for your help.
-Willie
________________________________________
From: [hidden email] [[hidden email]] on behalf of Markus Neteler [[hidden email]]
Sent: Sunday, March 04, 2012 4:22 AM
To: Glynn Clements
Cc: Liu, Huili; [hidden email]
Subject: Re: [GRASS-windows] grass_width, grass_heigt and grass_pngfile

On Sat, Mar 3, 2012 at 5:15 PM, Glynn Clements <[hidden email]> wrote:
> Liu, Huili wrote:
>> I am trying to create a python script to get an image file as below:
...
>> But I got the default image file name,  map.png with GRASS_WIDTH=640 and GRASS_HEIGHT=480.
>> Is there any way for me to setup  width and height and my image file name in grass.run_command?
>> I searched the doc for a while but I still can not get a correct syntax.
>
>        import os
>        os.environ['GRASS_PNGFILE'] = filename
>        os.environ['GRASS_WIDTH'] = str(width)
>        os.environ['GRASS_HEIGHT'] = str(height)

Added in rudimentary form to the Wiki page:
http://grass.osgeo.org/wiki/GRASS_and_Python#Controlling_the_PNG_display_driver

(feel free to improve there, just requires registration in the Wiki)

Markus
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows


The information contained in this communication is intended for the use
of the designated recipients named above. If the reader of this
communication is not the intended recipient, you are hereby notified
that you have received this communication in error, and that any review,
dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this communication in error, please
notify The Associated Press immediately by telephone at +1-212-621-1898
and delete this email. Thank you.
[IP_US_DISC]

msk dccc60c6d2c3a6438f0cf467d9a4938



------------------------------

_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows


End of grass-windows Digest, Vol 64, Issue 3
********************************************