[GRASS-dev] [GRASS GIS] #3033: Cairo and PS drivers display only one raster or vector for SVG and PS
GRASS GIS
trac at osgeo.org
Tue May 17 00:18:59 PDT 2016
#3033: Cairo and PS drivers display only one raster or vector for SVG and PS
-------------------------+-------------------------------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.2.0
Component: Display | Version: svn-trunk
Resolution: | Keywords: d.mon, cairo, ps, SVG, vector
CPU: | graphics
Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------
Comment (by glynn):
Replying to [ticket:3033 wenzeslaus]:
> However, using Cairo driver with SVG output, you get only the vector
which is rendered last:
This is a limitation of cairo's SVG (and PostScript) "surface" and the
fact that d.* commands run as distinct processes. It isn't possible to
initialise a surface from an existing SVG file so that subsequent drawing
operations will be appended to the document structure, and you can't
simply concatenate the files.
In other words, GRASS_RENDER_FILE_READ=TRUE doesn't work for vector
formats. You need to generate multiple output files then combine them with
external tools.
> Same applies for the PS driver:
The PS driver does support combining multiple commands into a single
stream, via the environment variables GRASS_RENDER_PS_HEADER and
GRASS_RENDER_PS_TRAILER (although I have no idea whether these can be
controlled via d.mon).
With GRASS_RENDER_PS_HEADER=FALSE, the output file is opened for append
rather than write (i.e. the existing contents are retained) and no header
(prologue) is written.
With GRASS_RENDER_PS_TRAILER=FALSE, no trailer is written.
Both variables default to TRUE, meaning that each command will replace any
previous file and a header and trailer will be included. To combine the
output from multiple commands into a single file, all commands but the
first should have GRASS_RENDER_PS_HEADER=FALSE, while all commands but the
last should have GRASS_RENDER_PS_TRAILER=FALSE.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3033#comment:1>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list