<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
So, my questions are:<br>
Why counting pixels was not faster in the second subset with pixels of 5x5<br>
meters?<br>
<br></blockquote><div><br></div><div>I cannot tell based upon your queries. I can't distinguish which query times are for the 5x5 vs 1x1. Have you tried doing outdb? It may be more performant for a source raster of that size.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How ST_Count works? Does it uses the ST_Value function in each pixel of the<br>
pixel matrix row by row in each tile to keep track of the nodata value<br>
pixels?<br>
<br></blockquote><div><br></div><div>No. ST_Count goes a different pathway. It does need to check each pixel for the NODATA value though. I suspect ST_Count is just returning the "count" value of ST_SummaryStats as the general cost of counting pixels in a raster is the majority required for summary stats.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is the raster support in postgis, in general, only suitable to get pixel<br>
statistics of some region in the raster?<br>
<br></blockquote><div><br></div><div>Nope. That is the general use case but I know of places where modeling surfaces is done in-database.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Whats the advantages of using postgis raster to analyze rasters compared to<br>
some of the arcgis tools (for example)? I ask that because is much more<br>
easier to visualize the data in arcgis compared to postgis tables in QGIS<br>
plugin (wkt raster)<br>
<br></blockquote><div><br></div><div>Depends on how big your dataset is. If you're working on longitudinal datasets (over space and time) the database is better prepared for work on these kinds of datasets.</div><div> </div><div>One thing that I realize is that ST_Area could be faster at least in the case of no skew by not going to geometry.</div><div><br></div><div>-bborie</div></div><br></div></div>