[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
Wed May 18 22:07:35 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 [comment:2 wenzeslaus]:
> This is serious limitation. Is there a way to change the rendering to
not have this problem.
Write SVG to a temporary file, read and parse the original file and
temporary file, merge SVG documents, write XML.
Merging the documents isn't exactly trivial, e.g. you need to rename
elements in <defs> sections (and any references to them) to avoid name
collisions. This might be feasible if we can figure out some bounds on
what we can expect cairo to generate, but it's still a fair amount of work
and seems fragile (e.g. future versions of cairo may change the document
structure).
> Combining manually in Inkscape was not possible; I was not able to align
the layers.
Inkscape is garbage for anything with technical constraints. I usually end
up writing Python scripts to manipulate the XML.
> But it seems that PS driver is not as powerful as Cairo and same things
are lost during the subsequent conversions, page size was wrong as well.
Converting !PostScript invariably loses information. Being a programming
language rather than a data format means that you can't extract high-
levels structure, you just have to execute it and capture the rendering
primitives.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3033#comment:3>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list