[postgis-users] Finding highest cell value in raster using ST_Value

e.j.h.polle e.j.h.polle at gmail.com
Mon Jun 25 13:16:19 PDT 2012


Hi,

OK - with ST_SummaryStats it is easy to retrieve the highest value in the 
raster, but then I only have this value. Now I want to retrieve 
(information about) the cell/pixel having this value, to be able to 
visualize the highest point on the map. My original query (see first post) 
does give me this information (after 45 seconds...).

How would I go about to get hold of the pixel with the highest value, 
knowing this value?

Cheers,

Egge-Jan

On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
>
> Why don't you use ST_SummaryStats instead ST_Value? That way you can get 
> easily any basic stat, included the maximum value of the raster. It would 
> be 
> something like: 
>
> SELECT (ST_SummaryStats(rast)).max FROM raster_table; 
>
> -- 
> View this message in context: 
> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-ST-Value-tp4998545p4998554.html 
> Sent from the PostGIS - User mailing list archive at Nabble.com. 
> _______________________________________________ 
> postgis-users mailing list 
> postgis-users at postgis.refractions.net 
> http://postgis.refractions.net/mailman/listinfo/postgis-users 
>

On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
>
> Why don't you use ST_SummaryStats instead ST_Value? That way you can get 
> easily any basic stat, included the maximum value of the raster. It would 
> be 
> something like: 
>
> SELECT (ST_SummaryStats(rast)).max FROM raster_table; 
>
> -- 
> View this message in context: 
> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-ST-Value-tp4998545p4998554.html 
> Sent from the PostGIS - User mailing list archive at Nabble.com. 
> _______________________________________________ 
> postgis-users mailing list 
> postgis-users at postgis.refractions.net 
> http://postgis.refractions.net/mailman/listinfo/postgis-users 
>

On Sunday, June 24, 2012 8:47:58 PM UTC+1, DavidRA wrote:
>
> Why don't you use ST_SummaryStats instead ST_Value? That way you can get 
> easily any basic stat, included the maximum value of the raster. It would 
> be 
> something like: 
>
> SELECT (ST_SummaryStats(rast)).max FROM raster_table; 
>
> -- 
> View this message in context: 
> http://postgis.17.n6.nabble.com/Finding-highest-cell-value-in-raster-using-ST-Value-tp4998545p4998554.html 
> Sent from the PostGIS - User mailing list archive at Nabble.com. 
> _______________________________________________ 
> postgis-users mailing list 
> postgis-users at postgis.refractions.net 
> http://postgis.refractions.net/mailman/listinfo/postgis-users 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120625/14ccedc6/attachment.html>


More information about the postgis-users mailing list