[postgis-devel] [PostGIS] #931: [raster] ST_Mean
PostGIS
trac at osgeo.org
Fri May 13 15:00:48 PDT 2011
#931: [raster] ST_Mean
----------------------------+-----------------------------------------------
Reporter: dustymugs | Owner: dustymugs
Type: task | Status: assigned
Priority: medium | Milestone: PostGIS Raster Future
Component: postgis raster | Version: trunk
Keywords: |
----------------------------+-----------------------------------------------
Changes (by dustymugs):
* status: new => assigned
Comment:
I've decided to go with your suggestion Pierre.
{{{
ST_Mean(rastertable text, rastercolumn text)
}}}
I realized as I was playing around with various possibilities that your
way was the only way that a tile would be loaded one at a time and not
overtly tax memory.
So, a set of variations of ST_Mean and ST_ApproxMean for handling large
sets of raster tiles:
1. ST_Mean(rastertable text, rastercolumn text, nband int, hasnodata
boolean) -> double precision
{{{
ST_Mean('tmax_2010', 'rast', 1, FALSE)
ST_Mean('precip_2011', 'rast', 1, TRUE)
}}}
2. ST_Mean(rastertable text, rastercolumn text, nband int) -> double
precision
hasnodata is set to FALSE
{{{
ST_Mean('tmax_2010', 'rast', 1)
}}}
3. ST_Mean(rastertable text, rastercolumn text, hasnodata boolean) ->
double precision
nband is set to 1
{{{
ST_Mean('precip_2011', 'rast', TRUE)
}}}
4. ST_Mean(rastertable text, rastercolumn text) -> double precision
nband is set to 1 and hasnodata is set to FALSE
{{{
ST_Mean('tmin_2009', 'rast')
}}}
Variations for ST_ApproxMean are:
1. ST_ApproxMean(rastertable text, rastercolumn text, nband int, hasnodata
boolean, sample_percent double precision) -> double precision
{{{
ST_ApproxMean('tmax_2010', 'rast', 1, FALSE, 0.5)
ST_ApproxMean('precip_2011', 'rast', 1, TRUE, 0.2)
}}}
2. ST_ApproxMean(rastertable text, rastercolumn text, nband int,
sample_percent double precision) -> double precision
hasnodata is set to FALSE
{{{
ST_ApproxMean('tmax_2010', 'rast', 1, 0.5)
ST_ApproxMean('precip_2011', 'rast', 1, 0.2)
}}}
3. ST_ApproxMean(rastertable text, rastercolumn text, hasnodata boolean,
sample_percent double precision) -> double precision
nband is set to 1
{{{
ST_ApproxMean('tmax_2010', 'rast', FALSE, 0.5)
ST_ApproxMean('precip_2011', 'rast', TRUE, 0.2)
}}}
4. ST_ApproxMean(rastertable text, rastercolumn text, sample_percent
double precision) -> double precision
nband is set to 1 and hasnodata is set to FALSE
{{{
ST_ApproxMean('tmax_2010', 'rast', 0.5)
ST_ApproxMean('precip_2011', 'rast', 0.2)
}}}
5. ST_ApproxMean(rastertable text, rastercolumn text) -> double precision
nband is set to 1, hasnodata is set to FALSE and sample_percent is set
to 0.1
{{{
ST_ApproxMean('tmax_2010', 'rast')
ST_ApproxMean('precip_2011', 'rast')
}}}
Similar variations will be provided for ST_SummaryStats, ST_StdDev and
ST_MinMax and corresponding approximation functions.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/931#comment:5>
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-devel
mailing list