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

2012-06-25 Thread Pierre Racine
> boun...@postgis.refractions.net] On Behalf Of e.j.h.polle > Sent: Monday, June 25, 2012 5:34 PM > To: postgis-us...@googlegroups.com > Cc: PostGIS Users Discussion > Subject: Re: [postgis-users] Finding highest cell value in raster using > ST_Value > > Hi Bborie, Pierre,

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

2012-06-25 Thread e.j.h.polle
inal Message- > >> From: postgis-users-boun...@postgis.refractions.net [mailto: > postgis-users- > >> boun...@postgis.refractions.net] On Behalf Of Bborie Park > >> Sent: Monday, June 25, 2012 4:32 PM > >> To: postgis-users@postgis.refractions.net

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

2012-06-25 Thread Bborie Park
ns.net] On Behalf Of Bborie Park >> Sent: Monday, June 25, 2012 4:32 PM >> To: postgis-users@postgis.refractions.net >> Subject: Re: [postgis-users] Finding highest cell value in raster using >> ST_Value >> >> Egge-Jan, >> >> That is an intriguing qu

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

2012-06-25 Thread Pierre Racine
is-users- > boun...@postgis.refractions.net] On Behalf Of Bborie Park > Sent: Monday, June 25, 2012 4:32 PM > To: postgis-users@postgis.refractions.net > Subject: Re: [postgis-users] Finding highest cell value in raster using > ST_Value > > Egge-Jan, > > That is an intrig

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

2012-06-25 Thread Bborie Park
Egge-Jan, That is an intriguing question with no clean/simple solution. The fastest approach may be to call ST_Reclass() to create a 1BB mask based upon that value and the pass the resulting raster to ST_PixelAsPolygons() which will give you what you want. Yes, the above is a round-about way to

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

2012-06-25 Thread e.j.h.polle
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

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

2012-06-24 Thread DavidRA
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-hig

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

2012-06-24 Thread e.j.h.polle
Hi Group, I think I want your opinion on a query I have written. The goal is to find the highest value in a DEM, a raster table. The solution I found brings me where I want to go, but it takes 45 seconds on a relatively small (225*259) grid. It looks like it is especially the nested loop on th