[postgis-users] Question: calculating the slope with PostGIS 2.0

Francois Hugues hugues.francois at irstea.fr
Fri Oct 19 08:08:59 PDT 2012


This is a select query. If you want to create a new table try
Create table mytable as
Myselect

Hugues 


-------- Message d'origine--------
De: postgis-users-bounces at postgis.refractions.net de la part de Pierre LACROIX
Date: ven. 19/10/2012 15:42
À: PostGIS Users Discussion
Objet : Re: [postgis-users] Question: calculating the slope with PostGIS 2.0
 
Thanks.
Does that create a new slope raster in the database?
After refreshing there is nothing new.

2012/10/18 Bborie Park <bkpark at ucdavis.edu>

> Pierre,
>
> The pixel type isn't 'Integer'.  The list of valid pixel types are:
>
>     1BB - 1-bit boolean
>
>     2BUI - 2-bit unsigned integer
>
>     4BUI - 4-bit unsigned integer
>
>     8BSI - 8-bit signed integer
>
>     8BUI - 8-bit unsigned integer
>
>     16BSI - 16-bit signed integer
>
>     16BUI - 16-bit unsigned integer
>
>     32BSI - 32-bit signed integer
>
>     32BUI - 32-bit unsigned integer
>
>     32BF - 32-bit float
>
>     64BF - 64-bit float
>
> So, you'd call ST_Slope() with something like.
>
> SELECT ST_Slope(rast, 1, '32BUI') from Raster1;
>
>
> -bborie
>
> On 10/18/2012 12:14 PM, Pierre LACROIX wrote:
> > Hi,
> >
> > I would like to generate the slope from a DEM.
> > The DEM is called Raster1. It has one band and holds integer values.
> >>From the the SQL Editor (in the PG Admin) the following command displays
> > values but does not generate an output slope raster:
> >
> > SELECT ST_Slope(rast, 1,'Integer') from Raster1;
> >
> > What is the syntax to generate the slope raster?
> >
> > Thanks in advance.
> >
> > Pierre
> >
> >
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
>
> --
> Bborie Park
> Programmer
> Center for Vectorborne Diseases
> UC Davis
> 530-752-8380
> bkpark at ucdavis.edu
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3853 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20121019/09987df3/attachment.bin>


More information about the postgis-users mailing list