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:

SELECT rast
FROM globaldtm
WHERE ST_Intersects(rast,ST_envelope( (select geometry from polygons
where id =25)));

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.

Does anyone have some good example about that? Thanks.


-- 
*YU Guo
*
MSc. Hydroinformatics and Water Management
*Email*: *[email protected]*
*Phone*: +33 668 195803
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to