[postgis-users] screen copy with postgis

Tumasgiu Rossini rossini.t at gmail.com
Wed Feb 22 13:55:53 PST 2017


Hi,

I'm not sure there is a function that can burns geometries on an existing
raster.

So I guess you will need to create a raster for each "layer" you want to
draw (e.g. the polygons, the boundaries...) and merge them into a
final raster using st_mapalgebra.

2017-02-22 21:48 GMT+01:00 Olivier Leprêtre <o.lepretre at gmail.com>:

> Hi,
>
>
>
> 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.
>
>
>
> SELECT ST_AsJPEG(ST_AsRaster(st_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,true))
>
>
>
> 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).
>
>
>
> 1)    Is there a way to keep those boundaries ?
>
> 2)    As I have other layers, like texts, will it be possible to make
> them appear also, like a screen copy ?
>
>
>
> In other words, more simply, am I on the right way or should I think to a
> completely different solution ?
>
>
>
> Thanks,
>
>
>
> Olivier
>
>
>
>
>
> ------------------------------
> [image: Avast logo]
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>
> L'absence de virus dans ce courrier électronique a été vérifiée par le
> logiciel antivirus Avast.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20170222/4d9aa718/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 12681 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20170222/4d9aa718/attachment.jpg>


More information about the postgis-users mailing list