[postgis-users] Pixels' neighbors

Hugues François hugues.francois at irstea.fr
Tue Jul 2 13:33:17 PDT 2013


Hello Bborie,

Thanks for your answers.  I have requested  our team to migrate to postgis2.1 since beta version been released but unsuccessfully. I hope things will move with the official release. I fall in love with these "new sexy features" and others.

Awaiting for this moment, I will look further at st_MapAlgebraNbr but I'm afraid I won't manage to deal with different tiles.

Regards,

Hugues

-----Message d'origine-----
De : postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-bounces at lists.osgeo.org] De la part de dustymugs
Envoyé : mardi 2 juillet 2013 19:09
À : postgis-users at lists.osgeo.org
Objet : Re: [postgis-users] Pixels' neighbors

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
> 
_______________________________________________
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