[GRASS-user] Creating a png file with multiple vector maps

Moritz Lennert mlennert at club.worldonline.be
Fri Mar 12 00:24:57 PST 2021


Hi Chris,

In your previous message the settings you used had a lot of MS Windows paths in them, that's why I thought you used that. If you're not on Windows then these settings are wrong and this might explain your problem. Here's what you sent:

GRASS 7.8.4> env | grep GRASS
MANPATH=C:\OSGEO4~1\apps\grass\grass78\docs\man;C:\Users\Chris\AppData\Roaming\GRASS7\addons\docs\man
GRASS_PYTHON=C:\OSGEO4~1\bin\python3.exe
GRASS_RENDER_TRANSPARENCY=true
GRASS_PAGER=more
GRASS_GNUPLOT=gnuplot -persist
GRASS_RENDER_PNG_COMPRESSION=0
GRASS_RENDER_FILE_COMPRESSION=0
GRASSBIN=C:\OSGEO4~1\apps\grass\grass78\bin
GRASS_RENDER_FILE=test.png
GRASS_SH=C:\OSGEO4~1\apps\msys\bin\sh.exe
GRASS_RENDER_HEIGHT=480
PATH=/c/OSGEO4~1/apps/grass/grass78/lib:/c/OSGEO4~1/apps/grass/grass78/bin:/c/Users/Chris/AppData/Roaming/GRASS7/addons/bin:/c/OSGEO4~1/apps/Python37:/c/OSGEO4~1/apps/Python37/Scripts:/c/OSGEO4~1/apps/Python27/Scripts:/c/OSGEO4~1/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/system32/WBem:/usr/bin:/c/Program Files/RStudio/bin:/c/OSGEO4~1/apps/grass/grass78/bin:/c/OSGEO4~1/apps/grass/grass78/scripts:/c/OSGEO4~1/apps/grass/grass78/lib:.:/c/OSGEO4~1/apps/Python37/lib/site-packages/pywin32_system32
GRASS_MESSAGE_FORMAT=plain
GRASS_PROJSHARE=C:\OSGEO4~1\share\proj
PS1=GRASS 7.8.4>
GRASS_VERSION=7.8.4
GRASS_HTML_BROWSER=start
GRASS_RENDER_WIDTH=640
GRASS_RENDER_TRUECOLOR=true
GRASS_RENDER_IMMEDIATE=png
GRASS_ADDON_BASE=C:\Users\Chris\AppData\Roaming\GRASS7\addons
GRASS_RENDER_FILE_READ=true


All the C:\ paths indicate Windows.

Moritz

Am 11. März 2021 21:37:01 MEZ schrieb Chris Bartolomei <surfcjb at yahoo.com>:
> Helmut ... thank you for your example however I think there is a misunderstanding of what I am trying to do.  I am using GRASS on Linux (on a cluster) and the issue I am experiencing is overlaying two polygon maps (layers in Arc-speak). Points and lines on top of ONE set of polygons works fine as you have shown, however using two or more polygon maps (layers) does not seem to work. I attached an example of what i am trying to achieve: Take for instance a polygon representing Italy and you wanted it colored dark gray, then you want to overlay on top of that an administrative map showing only the areas of Lazio and Liguria colored in blue but no other administrative areas. The result would look like the Italy_sample.png file i attached (I made is using ArcPro as i am not in the office with access to our cluster).  This is what is not working using the d.mon=png, d.vect tools. Could you please try something similar and see if it works for you (on linux)?v/rChris
> 
>
>    On Tuesday, March 2, 2021, 2:38:45 PM EST, Helmut Kudrnovsky <hellik at web.de> wrote:  
> 
> >I don't see anything immediately wrong. Maybe it is a specific MS
>>Windows issue I cannot reproduce here in GNU/Linux.
>>
>>@Helmut any ideas ?
>
>tested here in the following way in OSGeo4W-winGRASS 7.8.5
>
>(1) changing the working directory via GUI > change working directory
> 
> cd "D:\temp\testgrassrender"                                                    
>Working directory changed to:                                                  
>"D:\temp\testgrassrender"
>
>(2) in OSgeo4W-winGRASS-windows console (no msys needed!), also change here to the new wd:
>
>C:\>cd D:\temp\testgrassrender
>C:\>d:
>
>(3) put the variables and d.-commands into a bat-file into the working directory (D:\temp\testgrassrender\mytest.bat):
>
>REM start of the batch file
>
>set GRASS_RENDER_IMMEDIATE=png
>set GRASS_RENDER_WIDTH=640
>set GRASS_RENDER_HEIGHT=480
>set GRASS_RENDER_TRANSPARENT=true
>set GRASS_RENDER_TRUECOLOR=true
>set GRASS_RENDER_FILE_COMPRESSION=0
>set GRASS_MESSAGE_FORMAT=plain
>set GRASS_RENDER_FILE_READ=TRUE
>
>g.region vect=census_wake2000
>d.vect map=census_wake2000 fill_color=none
>d.vect map=roadsmajor color=255:0:0:255
>d.vect map=schools_wake fill_color=0:128:0:255 icon=basic/circle size=10
>
>REM end of the batch file
>
>=> see here: in order to set a variable in the windows world, use e.g. set GRASS_RENDER_IMMEDIATE=png instead if export GRASS_RENDER_IMMEDIATE=png in the *nix world
>
>(4) start your batch file in the windows command line:
>
>D:\temp\testgrassrender>mytest.bat
>
>D:\temp\testgrassrender>set GRASS_RENDER_IMMEDIATE=png
>D:\temp\testgrassrender>set GRASS_RENDER_WIDTH=640
>D:\temp\testgrassrender>set GRASS_RENDER_HEIGHT=480
>D:\temp\testgrassrender>set GRASS_RENDER_TRANSPARENT=true
>D:\temp\testgrassrender>set GRASS_RENDER_TRUECOLOR=true
>D:\temp\testgrassrender>set GRASS_RENDER_FILE_COMPRESSION=0
>D:\temp\testgrassrender>set GRASS_MESSAGE_FORMAT=plain
>D:\temp\testgrassrender>set GRASS_RENDER_FILE_READ=TRUE
>D:\temp\testgrassrender>g.region vect=census_wake2000
>D:\temp\testgrassrender>d.vect map=census_wake2000 fill_color=none
>d.vect komplett.
>
>D:\temp\testgrassrender>d.vect map=roadsmajor color=255:0:0:255
>d.vect komplett.
>
>D:\temp\testgrassrender>d.vect map=schools_wake fill_color=0:128:0:255 icon=basic/circle size=10
>d.vect komplett.
>
>(5) see attached the result png - it looks like the same as Moritz's example
>
>kind regards
>Helmut
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20210312/6560f6c8/attachment.html>


More information about the grass-user mailing list