[postgis-users] How does ST_Slope works ?

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Wed Jun 13 12:13:16 PDT 2012


> 1. To know which Pixeltype I had to use, I tried to use st_bandpixeltype which
> told me my pixels were 32BSI type but my results using this type are 0 or 1 and if
> I try another type like 32BF, results seems to be more useful. Does someone
> have an explanation about this weird difference ? What is the unit used by
> st_slope ?

The results are in radian so rounded to 0 or 1 when the pixel type is integer.

> 2. My raster is a tiled one and as you can see on both pictures, ST_Slope gives no
> results for pixels located at the border of each tile. I can understand it is
> impossible to find the slope for the pixels which make the border of the raster,
> but is there not a way to have complete results for the tile in the middle of the
> raster and thus use the neighboring tiles.

Not yet. The only way is to load the raster untiled or to ST_Union them which might be slow.

Pierre



More information about the postgis-users mailing list