<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi all,</p>
<p>On 2018-07-05 11:48, Even Rouault wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">     * Do you have any ideas how to technically solve the issue of<br /> retaining style while also allow the querying of vector features?<br /> Perhaps export as raster to retain style with invisible (transparent)<br /> vector overlays?</blockquote>
<br /> If you do exactly as you mention, that would be confusing for the users as in <br /> the layer tree they would see 2 layers, one rasterized, and the other one with <br /> the vector. But technically in PDF you can mix raster and vector in the same <br /> layer, so, in theory, you could add the invisible vector overlays in the same <br /> layer as the raster info.<br /> I believe the GDAL PDF writer could be extended to do that. You would need to <br /> provide it with some configuration with a description of a layer hierarchy, <br /> and for each layer its raster (or rasterized vector) and vector components.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
</blockquote>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">I like this idea of "hybrid" vector/raster layers (both types in one layer). I am aware that the file-size would be bloated. But on the other hand for some layer styles compression would work very well.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">In an ideal world, QGIS could examine layer styles and decide what could be exported as vectors only, because the style, e.g. is only simple fills and strokes and what layer styles would have to be rasterized.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">The other open question is what would happen with labels - would they be rasterized as well? What about layer hierarchy? QGIS always draws labels on top of any other layer, but PDF does not ... </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br /><br /> If you have many vector layers, the size of the PDF and the drawing time could <br /> become quite big with that approach though<br /><br /> There could be some difficulties with ponctual symbols. QGIS would have to <br /> describe them as polygons with some extent so that they can be clicked on.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
</blockquote>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">agreed this is yet another issue we would come across. I wonder what ArcGIS/Geomedia is doing in such cases?</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div> </div>
<div>Even - would you be interested in working on this - perhaps together with another QGIS dev who knows QGIS rendering internals very well?</div>
<div> </div>
<div>Thanks and greetings,</div>
<div>Andreas</div>
</body></html>