[postgis-users] Pixels' neighbors
dustymugs
dustymugs at gmail.com
Tue Jul 2 10:09:15 PDT 2013
Hugues,
Another possibility if you have PostGIS 2.1 is ST_Neighborhood().
http://www.postgis.net/docs/manual-dev/RT_ST_Neighborhood.html
-bborie
On 07/02/2013 09:47 AM, Hugues François wrote:
> Hello,
>
> Given a one band raster made of numerous tiles and a point geometry from which I select one pixel, I would like to compare its value with its (8) neighbors' values. For now I do that with st_value(rast, geom) and playing with point coordinates (x +/- pixel width and y +/- height) : it works fine but it is very slow and I have to make a loop to compare selected pixels' values with their neighbors until I reach a certain value.
>
> What I would like is to do all that only with raster but I don't see how to compare one pixel value with its neighbors (within the same tile or into a neighbor tile). I assume I miss something and this is obvious for some of you, so if you could give a hand, i would be sincerely grateful.
>
> Regards,
>
> Hugues.
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list