[postgis-users] PostGIS Raster Performance

DanielFranco dfranco at computacao.ufla.br
Wed Aug 20 14:00:59 PDT 2014


Hi, I'm a newbie in PostGIS Raster use and GIS applications, so this may be a
dumb question. I'm a little confused by some functionalities and I don't
know if it's possible to do what i'm trying to. Basically, I'm using postgis
functions either for raster and vector forms of an image and I'm trying to
visualize parts of the raster by using the informations presented only in
the shapefile. For example, I have an TIFF file of a land coverage (one
band) about 49746 x 71819 and it's shapefile with some grid codes. I'm doing
the following query to extract pixel values from an expecific gridcode (18)
presented in the shapefile imported (vector_table) so I could infer some
grid codes by the pixel value:

SELECT (gval).val as pixel_value
FROM 
( SELECT ST_DumpAsPolygons(ST_Clip(rast,1,geom)) as gval
from raster_table
join vector_table
on (st_intersects(rast,geom))
where geom in (select geom from vector_table where gridcode = 18)
) as intersection;

The query runs too slow and I don't know how to optimize it. The raster
image is big and I tried different tiles configurations (100x100, 200x200,
1000x1000) and 100x100 seemed to have better perfomance. I'm using st_clip
for a faster answer. I don't know if these pixels values would retrieve some
important information and if PostGIS raster is really suitable with area
calculations. Is there a way to optimize the query or postgis raster isn't
suitable for this case?



--
View this message in context: http://postgis.17.x6.nabble.com/PostGIS-Raster-Performance-tp5006902.html
Sent from the PostGIS - User mailing list archive at Nabble.com.


More information about the postgis-users mailing list