[postgis-devel] ST_Envelope & spatial index
dustymugs
dustymugs at gmail.com
Tue Mar 13 15:11:22 PDT 2012
On 03/13/2012 03:07 PM, Andrea Peri wrote:
> Thx Paul for explaination.
> I don't know the question of ST_ConvexHull(raster).
> You have right , the ST_Extent will scan all the table.
>
> My really question is that
>
> To understand how work the postgis raster , I try to load a raster table
> with this settings:
>
> raster2pgsql -s 3003 -l 3 -C -e -Y -I -M *.tif -F -f rast -d -t 100x100
> my_schema.ofc10k_2010> ofc10k_2010.sql
>
> They are about 80 tiffs where every tif file is an color orthophoto of
> about 13.000 x 11.000 px each.
>
> After this I need to find the total extent covered from all the raster
> table.
>
> To find this I try this query:
>
> select ST_Extent(ST_Envelope(rast)) from tabella;
>
> But it take many time, too time I guess.
>
By the looks of your use of raster2pgsql arguments, the maximum extent
constraint was applied. So, just use
SELECT extent FROM raster_columns WHERE r_table_schema = 'my_schema' AND
r_table_name = 'ofc10k_2010' AND r_raster_column = 'rast';
-bborie
More information about the postgis-devel
mailing list