[PostGIS] #1247: [raster] ST_AsRaster aggregate function

PostGIS trac at osgeo.org
Tue Oct 29 02:04:24 PDT 2024


#1247: [raster] ST_AsRaster aggregate function
--------------------------+---------------------------
  Reporter:  robe         |      Owner:  strk
      Type:  enhancement  |     Status:  assigned
  Priority:  medium       |  Milestone:  PostGIS 3.6.0
 Component:  raster       |    Version:  master
Resolution:               |   Keywords:
--------------------------+---------------------------
Description changed by strk:

Old description:

> Pierre,
>
> Not sure if this is what you had in mind when you said "Burn In" function
> in your talk.  A common need I have which I am sure is that of many BI
> analysts is the need to show simple thematic maps in reports.
>
> What came to mind to me was an aggregate ST_AsRaster function that takes
> a set of geomval rows (or multicolumn geom, value) and builds a raster.
> Basically a reverse of the ST_DumpAsPolgons function.
>
> http://www.postgis.org/documentation/manual-svn/RT_ST_AsRaster.html
> This would make it trivial to do a query such as
>

> {{{
> SELECT ST_AsPNG(ST_AsRaster(gval),300,300) As mymap
> FROM (SELECT ROW(ST_Union(geom), SUM(pop))::geomval As gval
> FROM sumregion
> GROUP BY region_name) As foo;
> }}}
>

> Which is big considering many report writers allow their picture box
> controls to be bound to query fields.  We might have a new crowd of BI
> analysts looking to get a piece of PostGIS action.

New description:

 Pierre,

 Not sure if this is what you had in mind when you said "Burn In" function
 in your talk.  A common need I have which I am sure is that of many BI
 analysts is the need to show simple thematic maps in reports.

 What came to mind to me was an aggregate [https://www.postgis.net/docs
 /manual-dev/RT_ST_AsRaster.html ST_AsRaster] function that takes a set of
 geomval rows (or multicolumn geom, value) and builds a raster.  Basically
 a reverse of the [https://www.postgis.net/docs/manual-
 dev/RT_ST_DumpAsPolygons.html ST_DumpAsPolgons] function.


 This would make it trivial to do a query such as


 {{{
 SELECT ST_AsPNG(ST_AsRaster(gval),300,300) As mymap
 FROM (SELECT ROW(ST_Union(geom), SUM(pop))::geomval As gval
 FROM sumregion
 GROUP BY region_name) As foo;
 }}}


 Which is big considering many report writers allow their picture box
 controls to be bound to query fields.  We might have a new crowd of BI
 analysts looking to get a piece of PostGIS action.

--
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/1247#comment:7>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list