Hi Bborie, Pierre,<br><br><br>Thanks for adding the ticket. (http://trac.osgeo.org/postgis/ticket/1889)<br><br>And I guess I am looking forward to PostGIS 2.1 then :-) (But I am still a little proud of my 'round-about way' to locate the cell with the highest value...)<br><br>Cheers,<br><br><br>Egge-Jan<br><br><br>Op maandag 25 juni 2012 21:39:29 UTC+1 schreef Bborie Park het volgende:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Too many columns.  I was thinking that this is better served in a
<br>separate function as that value could be repeated.  I'm adding a ticket
<br>for that separate function.
<br>
<br>On 06/25/2012 01:36 PM, Pierre Racine wrote:
<br>> Good find Bborie!
<br>> 
<br>> I would add that we should fill a ticket like "ST_Summary should report the x and y raster coordinates of the max and the min". So four new columns...
<br>> 
<br>> Pierre
<br>> 
<br>>> -----Original Message-----
<br>>> From: <a href="mailto:postgis-users-bounces@postgis.refractions.net" target="_blank">postgis-users-bounces@postgis.<wbr>refractions.net</a> [mailto:<a href="mailto:postgis-users-" target="_blank">postgis-users-</a>
<br>>> <a href="mailto:bounces@postgis.refractions.net" target="_blank">bounces@postgis.refractions.<wbr>net</a>] On Behalf Of Bborie Park
<br>>> Sent: Monday, June 25, 2012 4:32 PM
<br>>> To: <a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<wbr>refractions.net</a>
<br>>> Subject: Re: [postgis-users] Finding highest cell value in raster using ST_Value
<br>>>
<br>>> Egge-Jan,
<br>>>
<br>>> That is an intriguing question with no clean/simple solution.  The
<br>>> fastest approach may be to call ST_Reclass() to create a 1BB mask based
<br>>> upon that value and the pass the resulting raster to
<br>>> ST_PixelAsPolygons() which will give you what you want.
<br>>>
<br>>> Yes, the above is a round-about way to do this.  This is something I'll
<br>>> (ST_PixelofValue?) see about adding for PostGIS 2.1.
<br>>>
<br>>> -bborie
<br>>>
<br>>> On 06/25/2012 01:16 PM, e.j.h.polle wrote:
<br>>>> Hi,
<br>>>>
<br>>>> OK - with ST_SummaryStats it is easy to retrieve the highest value in the
<br>>>> raster, but then I only have this value. Now I want to retrieve
<br>>>> (information about) the cell/pixel having this value, to be able to
<br>>>> visualize the highest point on the map. My original query (see first post)
<br>>>> does give me this information (after 45 seconds...).
<br>>>>
<br>>>> How would I go about to get hold of the pixel with the highest value,
<br>>>> knowing this value?
<br>>>>
<br>>>> Cheers,
<br>>>>
<br>>>> Egge-Jan
<br>>>>
<br>>>> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
<br>>>>>
<br>>>>> Why don't you use ST_SummaryStats instead ST_Value? That way you can get
<br>>>>> easily any basic stat, included the maximum value of the raster. It would
<br>>>>> be
<br>>>>> something like:
<br>>>>>
<br>>>>> SELECT (ST_SummaryStats(rast)).max FROM raster_table;
<br>>>>>
<br>>>>> --
<br>>>>> View this message in context:
<br>>>>> <a href="http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-" target="_blank">http://postgis.17.n6.nabble.<wbr>com/Finding-highest-cell-<wbr>value-in-raster-using-</a>
<br>>> ST-Value-tp4998545p4998554.<wbr>html
<br>>>>> Sent from the PostGIS - User mailing list archive at Nabble.com.
<br>>>>> ______________________________<wbr>_________________
<br>>>>> postgis-users mailing list
<br>>>>> <a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<wbr>refractions.net</a>
<br>>>>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.<wbr>net/mailman/listinfo/postgis-<wbr>users</a>
<br>>>>>
<br>>>>
<br>>>> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
<br>>>>>
<br>>>>> Why don't you use ST_SummaryStats instead ST_Value? That way you can get
<br>>>>> easily any basic stat, included the maximum value of the raster. It would
<br>>>>> be
<br>>>>> something like:
<br>>>>>
<br>>>>> SELECT (ST_SummaryStats(rast)).max FROM raster_table;
<br>>>>>
<br>>>>> --
<br>>>>> View this message in context:
<br>>>>> <a href="http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-" target="_blank">http://postgis.17.n6.nabble.<wbr>com/Finding-highest-cell-<wbr>value-in-raster-using-</a>
<br>>> ST-Value-tp4998545p4998554.<wbr>html
<br>>>>> Sent from the PostGIS - User mailing list archive at Nabble.com.
<br>>>>> ______________________________<wbr>_________________
<br>>>>> postgis-users mailing list
<br>>>>> <a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<wbr>refractions.net</a>
<br>>>>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.<wbr>net/mailman/listinfo/postgis-<wbr>users</a>
<br>>>>>
<br>>>>
<br>>>> On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
<br>>>>>
<br>>>>> Why don't you use ST_SummaryStats instead ST_Value? That way you can get
<br>>>>> easily any basic stat, included the maximum value of the raster. It would
<br>>>>> be
<br>>>>> something like:
<br>>>>>
<br>>>>> SELECT (ST_SummaryStats(rast)).max FROM raster_table;
<br>>>>>
<br>>>>> --
<br>>>>> View this message in context:
<br>>>>> <a href="http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-" target="_blank">http://postgis.17.n6.nabble.<wbr>com/Finding-highest-cell-<wbr>value-in-raster-using-</a>
<br>>> ST-Value-tp4998545p4998554.<wbr>html
<br>>>>> Sent from the PostGIS - User mailing list archive at Nabble.com.
<br>>>>> ______________________________<wbr>_________________
<br>>>>> postgis-users mailing list
<br>>>>> <a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<wbr>refractions.net</a>
<br>>>>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.<wbr>net/mailman/listinfo/postgis-<wbr>users</a>
<br>>>>>
<br>>>>
<br>>>>
<br>>>>
<br>>>> ______________________________<wbr>_________________
<br>>>> postgis-users mailing list
<br>>>> <a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<wbr>refractions.net</a>
<br>>>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.<wbr>net/mailman/listinfo/postgis-<wbr>users</a>
<br>>>
<br>>> --
<br>>> Bborie Park
<br>>> Programmer
<br>>> Center for Vectorborne Diseases
<br>>> UC Davis
<br>>> 530-752-8380
<br>>> <a href="mailto:bkpark@ucdavis.edu" target="_blank">bkpark@ucdavis.edu</a>
<br>>> ______________________________<wbr>_________________
<br>>> postgis-users mailing list
<br>>> <a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<wbr>refractions.net</a>
<br>>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.<wbr>net/mailman/listinfo/postgis-<wbr>users</a>
<br>> ______________________________<wbr>_________________
<br>> postgis-users mailing list
<br>> <a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<wbr>refractions.net</a>
<br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.<wbr>net/mailman/listinfo/postgis-<wbr>users</a>
<br>> 
<br>
<br>-- 
<br>Bborie Park
<br>Programmer
<br>Center for Vectorborne Diseases
<br>UC Davis
<br>530-752-8380
<br><a href="mailto:bkpark@ucdavis.edu" target="_blank">bkpark@ucdavis.edu</a>
<br>______________________________<wbr>_________________
<br>postgis-users mailing list
<br><a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<wbr>refractions.net</a>
<br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.<wbr>net/mailman/listinfo/postgis-<wbr>users</a>
<br></blockquote>