[postgis-devel] SummaryStats
Pierre Racine
Pierre.Racine at sbf.ulaval.ca
Tue Mar 6 14:14:18 PST 2012
If I do:
SELECT (ss).min, (ss).max
FROM (SELECT ST_SummaryStats(rast)) ss
FROM my table) foo
what do I have to parse?
I know (ss).min is the min and (ss).max is the max
Pierre
> -----Original Message-----
> From: postgis-devel-bounces at postgis.refractions.net [mailto:postgis-devel-
> bounces at postgis.refractions.net] On Behalf Of Paul Ramsey
> Sent: Tuesday, March 06, 2012 5:11 PM
> To: PostGIS Development Discussion
> Subject: Re: [postgis-devel] SummaryStats
>
> You already have to parse it to reuse. No change there.
> P.
>
> On Tue, Mar 6, 2012 at 2:03 PM, Pierre Racine <Pierre.Racine at sbf.ulaval.ca>
> wrote:
> > Then you have to parse to reuse?
> >
> >> -----Original Message-----
> >> From: postgis-devel-bounces at postgis.refractions.net
> >> [mailto:postgis-devel- bounces at postgis.refractions.net] On Behalf Of
> >> Paul Ramsey
> >> Sent: Tuesday, March 06, 2012 5:03 PM
> >> To: PostGIS Development Discussion
> >> Subject: Re: [postgis-devel] SummaryStats
> >>
> >> No, I'm referring to my example below... where the numbers have
> >> little labels on them in the canonical output. Some kind of key/value
> >> structure. Far more human-friendly.
> >> Pierre's trick works to get something pretty but the canonical form
> >> can be human readable so why not make it so.
> >>
> >> P.
> >>
> >> On Tue, Mar 6, 2012 at 1:56 PM, dustymugs <dustymugs at gmail.com> wrote:
> >> > On 03/06/2012 01:46 PM, Paul Ramsey wrote:
> >> >>
> >> >> Raster seems to be full of these composite types, which are nice
> >> >> enough for returning stuff, but I have a problem with the
> >> >> canonical forms. Why is SummaryStats so anonymous?
> >> >>
> >> >> (65364,210241.004791319,3.21646479394345,,0,38.9035530090332)
> >> >>
> >> >> Why not something with tags so I can see what these things are?
> >> >>
> >> >> [sum=65364, min=210241.004791319, max=, etc]
> >> >>
> >> >> Could even go the JSON route.
> >> >>
> >> >
> >> > Paul,
> >> >
> >> > When you say tagged, are you talking about something like the
> >> > output of PostGIS_Full_version()?
> >> >
> >> > -bborie
> >> >
> >> > _______________________________________________
> >> > postgis-devel mailing list
> >> > postgis-devel at postgis.refractions.net
> >> > http://postgis.refractions.net/mailman/listinfo/postgis-devel
> >> _______________________________________________
> >> postgis-devel mailing list
> >> postgis-devel at postgis.refractions.net
> >> http://postgis.refractions.net/mailman/listinfo/postgis-devel
> > _______________________________________________
> > postgis-devel mailing list
> > postgis-devel at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-devel
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
More information about the postgis-devel
mailing list