<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">Hi,</span><div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">
<br></div><div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">Thanks for all of the suggestions. I will do some more testing. However, as for suggestion 1 i think the pixel size should be the same as the original raster or am I wrong?</div>
<div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><br></div><div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">Both the mean_mnt_bin raster and the priogrid_land shapefile can be downloaded as zip (2 mb) here: </div>
<div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><a href="http://gisintersect.com/mean_mnt_bin.zip" target="_blank" style="color: rgb(64, 100, 128); ">http://gisintersect.com/mean_mnt_bin.zip</a></div>
<div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><a href="http://gisintersect.com/priogrid_land.zip" target="_blank" style="color: rgb(64, 100, 128); ">http://gisintersect.com/priogrid_land.zip</a></div>
<div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><br></div><div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">Any help on getting the correct values would be very much appreciated.</div>
<div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><br></div><div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">My query:</div>
<div style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><div>DROP TABLE IF EXISTS mountain_cell;</div><div><br></div><div>SELECT </div><div>a.gid As id,</div><div>(ST_SummaryStats((ST_Union(ST_MapAlgebraExpr(ST_AsRaster(a.cell, b.rast, '32BF'), b.rast, 'rast2', '32BF','INTERSECTION','0','0',0))).rast, false)).mean As avgmnt</div>
<div>INTO mountain_cell</div><div>FROM </div><div>priogrid_land a LEFT JOIN </div><div>mountain b</div><div> ON ST_Intersects(a.cell, b.rast)</div><div>GROUP BY a.gid</div><div>ORDER BY a.gid;</div></div>