[postgis-users] PostGIS Raster / Geom intersection perfromance.

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Thu Apr 12 12:23:05 PDT 2012


try this:

SELECT (pvc).* 
FROM (SELECT ST_ValueCount(rast,1,false) AS pvc
      FROM (SELECT st_clip(rast, geom)
            FROM temprast, nucleos
            WHERE tag = '28079000101' AND ST_Intersects(rast, geom)
           ) foo2
     ) AS foo 
ORDER BY (pvc).value;

> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of LewInMadrid
> Sent: Thursday, April 12, 2012 3:14 PM
> To: postgis-users at postgis.refractions.net
> Subject: Re: [postgis-users] PostGIS Raster / Geom intersection perfromance.
> 
> When I try the same command with a tiled raster the indexes don't seem to be
> used.
> 
> If I specify the tile directly with rid=3, the query takes about 2 second.
> If not, it takes around 30seconds.
> 
> SELECT (pvc).* FROM (SELECT ST_ValueCount(rast,1,false) AS pvc
>   FROM ( SELECT st_clip(rast,
>                         (SELECT geom FROM nucleos WHERE tag =
> '28079000101')) rast
>          FROM temprast where rid=3) foo2
> ) AS foo ORDER BY (pvc).value;
> 
> What can I do to make it use the raster index?
> 
> --
> View this message in context: http://postgis.17.n6.nabble.com/PostGIS-Raster-
> Geom-intersection-perfromance-tp4748527p4862412.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list