[postgis-users] How does ST_Slope works ?

111 views
Skip to first unread message

Francois Hugues

unread,
Jun 13, 2012, 1:31:02 PM6/13/12
to postgi...@postgis.refractions.net

Hello list,

 

I have two (basics) questions about ST_Slope about somethings I don’t understand.

 

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 ?

 

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.

 

Hugues.

slopes32BSI.jpg
slopes32BF.jpg

Pierre Racine

unread,
Jun 13, 2012, 3:13:16 PM6/13/12
to PostGIS Users Discussion
> 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
_______________________________________________
postgis-users mailing list
postgi...@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Francois Hugues

unread,
Jun 14, 2012, 3:19:12 AM6/14/12
to PostGIS Users Discussion
Hello,

Thanks for your answer.

If some functions can't handle all the pixels, this is a big limit for the use of tiled rasters if some function can't handle all the pixels although tiling and indexing raster is a major improvement (thanks to postgis).It's going to be tricky if we need to have both tiled and untiled version for the same raster.

Hugues.


-------- Message d'origine--------
De: postgis-us...@postgis.refractions.net de la part de Pierre Racine
Date: mer. 13/06/2012 21:13
À: PostGIS Users Discussion
Objet : Re: [postgis-users] How does ST_Slope works ?
winmail.dat

Pierre Racine

unread,
Jun 14, 2012, 10:33:06 AM6/14/12
to PostGIS Users Discussion
> If some functions can't handle all the pixels, this is a big limit for the use of tiled
> rasters if some function can't handle all the pixels although tiling and indexing
> raster is a major improvement (thanks to postgis).It's going to be tricky if we
> need to have both tiled and untiled version for the same raster.

Yes. Right now only the functions dependent on neighbours are not working fine on tiled coverages. All the others do not have this problem. We have been thinking about different ways to support neighbourhood functions that I can't remember here. Maybe David could? One of the way is to pass the parameters of the coverage we are working on (schema, table, raster column) to the neighbour function so it could search for neighbour pixels values outside the current tile.

Comments (and funding) are very welcome on this.
Reply all
Reply to author
Forward
0 new messages