[postgis-tickets] [PostGIS] #1048: [raster] Coverage version of stats functions should be aggregates

PostGIS trac at osgeo.org
Sun Dec 8 12:18:15 PST 2013


#1048: [raster] Coverage version of stats functions should be aggregates
-------------------------+--------------------------------------------------
 Reporter:  pracine      |       Owner:  pracine       
     Type:  enhancement  |      Status:  new           
 Priority:  medium       |   Milestone:  PostGIS Future
Component:  raster       |     Version:  trunk         
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by dustymugs):

 It looks like aggregate functions cannot return sets of values/records.

 [http://www.postgresql.org/message-id/CAFj8pRBX0z-
 qU6oor_R06vTq3a10vJ+k1zVkk0d69vctVpTe1A at mail.gmail.com]

 As such, aggregate versions of ST_Histogram, ST_Quantile and
 ST_ValueCount() cannot result in a format as presently returned for the
 standard forms. It looks like there needs to be a singular form of output,
 such as an array...

 {{{
 SELECT
   ST_ValueCountAgg(rast, 1, ARRAY[1,2,3]::double precision[]) AS pvc
 FROM foo

 pvc
 ----------------------------------------------
 {{1,12,0.33333},{2,12,0.33333},{3,12,0.33333}}
 }}}


 The aggregate version of ST_SummaryStats() will return the same output of
 the normal function as it only returns one record.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1048#comment:8>
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