Hi Steve,<div><br></div><div>I have gotten the same problem (db server stopped running).</div><div><br></div><div>Joan<br><br><div class="gmail_quote">On 27 January 2012 20:05, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Joan,<br>
<br>
I've never used these function, but try doing:<br>
<br>
select st_quantile('kbd_ext', 'rast', 0.75);<br>
<br>
Since you probably do not want this called once for every row in the table.<br>
<br>
-Steve<div class="im"><br>
<br>
On 1/27/2012 2:03 PM, Joan wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Hi Bborie,<br>
<br>
This is my query and it crashes the db server.<br>
select st_quantile('kbd_ext', 'rast', 0.75) from kbd_ext limit 10;<br>
<br>
Joan<br>
<br>
On 27 January 2012 19:14, Bborie Park <<a href="mailto:bkpark@ucdavis.edu" target="_blank">bkpark@ucdavis.edu</a><br></div><div><div class="h5">
<mailto:<a href="mailto:bkpark@ucdavis.edu" target="_blank">bkpark@ucdavis.edu</a>>> wrote:<br>
<br>
Hey Joan,<br>
<br>
Assuming your whole coverage is in a table, you should use the<br>
table/column version of ST_Quantile (which by the looks of it is<br>
undocumented for some reason).<br>
<br>
The function definition of ST_Quantile(rastertable, rastercolumn) is...<br>
<br>
st_quantile(rastertable text, rastercolumn text, nband int DEFAULT<br>
1, exclude_nodata_value boolean DEFAULT TRUE, quantiles double<br>
precision[] DEFAULT NULL)<br>
<br>
At the moment an aggregate version of ST_Quantile (and the other<br>
basic stats functions) does not exist. It is expected that one will<br>
be written for PostGIS 2.1 assuming dev-time is available.<br>
<br>
-bborie<br>
<br>
<br>
On 01/27/2012 09:06 AM, Joan wrote:<br>
<br>
Hi,<br>
<br>
I would like to find the quantile values of a whole raster<br>
coverage, but<br>
ST_Quantile returns quantile values of each tile. Which would be<br>
the best<br>
method to approximate the quantile value of the whole coverage?<br>
<br>
Regards,<br>
<br>
Joan<br>
<br>
<br>
<br>
<br>
______________________________ _________________<br>
postgis-users mailing list<br>
postgis-users@postgis. <a href="http://refractions.net" target="_blank">refractions.net</a><br></div></div>
<mailto:<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<u></u>refractions.net</a>><br>
<a href="http://postgis.refractions" target="_blank">http://postgis.refractions</a>. net/mailman/listinfo/postgis- users<div class="im"><br>
<<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.<u></u>net/mailman/listinfo/postgis-<u></u>users</a>><br>
<br>
<br>
--<br>
Bborie Park<br>
Programmer<br>
Center for Vectorborne Diseases<br>
UC Davis<br>
530-752-8380<br></div>
<a href="mailto:bkpark@ucdavis.edu" target="_blank">bkpark@ucdavis.edu</a> <mailto:<a href="mailto:bkpark@ucdavis.edu" target="_blank">bkpark@ucdavis.edu</a>><br>
<br>
______________________________ _________________<br>
postgis-users mailing list<br>
postgis-users@postgis. <a href="http://refractions.net" target="_blank">refractions.net</a><br>
<mailto:<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<u></u>refractions.net</a>><br>
<a href="http://postgis.refractions" target="_blank">http://postgis.refractions</a>. net/mailman/listinfo/postgis- users<br>
<<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.<u></u>net/mailman/listinfo/postgis-<u></u>users</a>><div class="im"><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<u></u>refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.<u></u>net/mailman/listinfo/postgis-<u></u>users</a><br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<br>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<u></u>refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.<u></u>net/mailman/listinfo/postgis-<u></u>users</a><br>
</div></div></blockquote></div><br></div>