<div dir="ltr">

<div class="gmail-m_2033918191318644142cye-lm-tag cye-lm-tag" style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">I have a question about how to focal operations for raster statistics are working. I started off comparing the old depreciated function st_mapalgebrafctngb with the current version st_mapalgebra. The difference I have determined is that the st_mapalgebrafctngb will pass the call back function to the raster dataset similar to the st_mapalgebra, but as the function approaches the edge of the raster tile things get wonky. What are values that are assigned to pixels that do not have sufficient neighbors? When I run this bit of code. The ST_Value function reports that no values have been assigned. I assume this can be remedied by adding information through userargs.</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag"><br></span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">with smoothed_raster as</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">(</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">SELECT st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_mean4ma(double precision[][][],text,text[])':<wbr>:regprocedure, 'ignore', NULL) as rast</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">FROM glc2000_clipped_250 r</span></div><div class="gmail-m_2033918191318644142cye-lm-tag" style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">WHERE r.rid = 25</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">), original_raster as</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">(</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">SELECT r.rast</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">FROM glc2000_clipped_250 r</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">WHERE r.rid = 25</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">)</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">SELECT x, y, ST_Value(s.rast, x,y) as smoothed, ST_Value(o.rast, x,y) as original</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">FROM smoothed_raster s, original_raster o</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">CROSS JOIN generate_series(1,10) as x</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">CROSS JOIN generate_series(1,10) as y</span></div><div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag"> </span></div><div class="gmail-m_2033918191318644142cye-lm-tag" style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">This leads me to a larger question regarding<span class="cye-lm-tag"> </span><span class="gmail-m_2033918191318644142cye-lm-tag gmail-cye-lm-tag cye-lm-tag">focal analysis functions for raster datasets. Do these functions cross the tiles? Assume you have 9 tiles and each tile is composed of 3x3 pixels. Tiles 1-3 in row 1, 4-6 row 2 etc. If you have a neighborhood analysis function performing on tile 5. Will it grab adjacent pixels in tile 6? Unfortunately the examples I created returned with the same result.</span></span></div>

<br></div>