<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>I'm not sure there is a function that can burns geometries on an existing<br></div>raster.<br><br></div>So I guess you will need to create a raster for each "layer" you want to<br></div>draw (e.g. the polygons, the boundaries...) and merge them into a<br></div>final raster using st_mapalgebra.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-22 21:48 GMT+01:00 Olivier Leprêtre <span dir="ltr"><<a href="mailto:o.lepretre@gmail.com" target="_blank">o.lepretre@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="FR"><div class="m_6028859974753924749WordSection1"><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US">Hi,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US">I'm trying to do a "screen copy" from a set of polygons. So I thought that I could use St_AsRaster and St_AsJpeg as follow, with the selection of two poly.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US">SELECT ST_AsJPEG(ST_AsRaster(st_<wbr>collect((Select geom from poly where gid=605530),(Select geom from poly where gid=605533)),1000,1000, ARRAY['8BUI', '8BUI', '8BUI'], ARRAY[255,255,255], ARRAY[0,0,0],null,null,0,0,<wbr>true))<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US">I load the result in a C# app which is in charge to save it as a file. This "works" but I'm loosing the boundaries (tha't to say the red lines in the image below).<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US"><u></u> <u></u></span></p><p class="m_6028859974753924749MsoListParagraph"><u></u><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US"><span>1)<span style="font:7.0pt "Times New Roman"">    </span></span></span><u></u><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US">Is there a way to keep those boundaries ?<u></u><u></u></span></p><p class="m_6028859974753924749MsoListParagraph"><u></u><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US"><span>2)<span style="font:7.0pt "Times New Roman"">    </span></span></span><u></u><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US">As I have other layers, like texts, will it be possible to make them appear also, like a screen copy ?<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US">In other words, more simply, am I on the right way or should I think to a completely different solution ?<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US">Thanks,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US">Olivier<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Verdana","sans-serif""><img id="m_6028859974753924749Image_x0020_1" src="cid:image003.jpg@01D28D55.5B4D39D0" height="488" width="513"></span><span style="font-size:10.0pt;font-family:"Verdana","sans-serif"" lang="EN-US"><u></u><u></u></span></p></div>
<br><br>
<hr style="border:none;color:#909090;background-color:#b0b0b0;height:1px;width:99%">
<table style="border-collapse:collapse;border:none">
        <tbody><tr>
                <td style="border:none;padding:0px 15px 0px 8px">
                        <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank">
                                <img src="http://static.avast.com/emails/avast-mail-stamp.png" alt="Avast logo" border="0">
                        </a>
                </td>
                <td>
                        <p style="color:#3d4d5a;font-family:"Calibri","Verdana","Arial","Helvetica";font-size:12pt">
                                L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
                                <br><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank">www.avast.com</a>
                        </p>
                </td>
        </tr>
</tbody></table>
<br>
</div><br>______________________________<wbr>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>