<div dir="ltr"><div class="">
<p>I have put the Tiled Global DTM into PostGIS. It has around 1
million rows. So, when I search for the specific raster data for my
interested area (polygon), it takes almost 1 minutes to get the result.
The SQL I were using is as follows:</p>
<pre><code>SELECT rast
FROM globaldtm
WHERE ST_Intersects(rast,ST_envelope( (select geometry from polygons where id =25)));
</code></pre>
<p>I knew there is a way to speed up this query by using spatial index.
But I don't know how to get it work. Can I build my own index like
creating index according to the UTM zone. </p>
<p>Does anyone have some good example about that? Thanks. </p>
</div><br clear="all"><br>-- <br><div>
<div style="font-family:Tahoma;font-size:11pt;color:rgb(5,146,196)"><b>YU Guo<br></b></div>
<div style="font-family:Tahoma;font-size:8pt;color:rgb(102,102,102)">MSc. Hydroinformatics and Water
Management
<br>
<b>Email</b>:<span style="color:rgb(0,0,153)"> <u><a href="mailto:yuguo365@gmail.com" target="_blank">yuguo365@gmail.com</a></u></span><br>
<b>Phone</b>: <a style="color:rgb(0,0,153)" value="+447413333915">+33 668 195803</a>
</div><pre style="font-family:comic sans ms,sans-serif" cols="72"><br></pre><br></div>
</div>