[postgis-users] My slope calculation is too slow

Ahmet Temiz ahmettemiz88 at gmail.com
Mon May 25 23:47:12 PDT 2015


hello

My slope calculation is very slow.
Can you advice me any better way to speed up slope calculation.

here is the way I have used.
-------
Hibernate:
     CREATE VIEW vslp8 AS
    WITH r AS (  select
         ST_Transform(ST_Union(dem.rast),  32635) AS rast
     FROM
         rdem2 as dem
     where
         st_Intersects( st_transform(dem.rast, 32635) , ST_Transform(
 ST_GeomFromText('POLYGON((28.87774  40.44479446,28.87774
 40.755545,29.4603534  40.755545,29.4603534  40.44479446,28.87774
 40.44479446))',4326 ),32635))),

cx AS (SELECT
         ST_AsRaster( sf.the_geom,  r.rast) AS rast
     FROM
         ( SELECT
             ST_Transform(  ST_GeomFromText('POLYGON((28.87774
 40.44479446,28.87774  40.755545,29.4603534  40.755545,29.4603534
 40.44479446,28.87774  40.44479446))',
             4326 ),
             32635) AS the_geom ) sf CROSS
     JOIN r )
 SELECT
             ST_Clip(ST_Slope(r.rast, 1,  cx.rast),
             ST_Transform( ST_GeomFromText('POLYGON((28.87774
 40.44479446,28.87774  40.755545,29.4603534  40.755545,29.4603534
 40.44479446,28.87774  40.44479446))',
             4326 ),  32635)) AS rast
         FROM
             r  CROSS
         JOIN cx

-----

I will appreciate if you propose any way.

regards

-- 
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Bilgi İşlem  Dairesi Başkanlığı-CBS Grubu


________________________

Ahmet Temiz
Geological Eng.
Information Systems - GIS Group
Disaster and Emergency Management
of Presidency
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150526/076bf3c1/attachment-0001.html>


More information about the postgis-users mailing list