Thanks for the advice. I did retile my rasters down to 100x100 simply be dropping and reloading (easy enough through a simple script.) I didn't notice an appreciable difference although I didn't check the logs for exact times. <div>
<div><br></div><div>Interesting thought on putting all tiles for all layers in the same table. I had to read that a few times to understand it. I will try that and compare to what I have now, which is a php script that queries each of my 17 raster layers and returns those results in a couple of seconds. Good enough for now. </div>
<div><br clear="all"><div>- John</div><div><br></div>***********************************************<br>John Callahan, Research Scientist<br>Delaware Geological Survey, University of Delaware<br>URL: <a href="http://www.dgs.udel.edu" target="_blank">http://www.dgs.udel.edu</a><br>
*************************************************<br><br>
<br><br><div class="gmail_quote">On Tue, Feb 21, 2012 at 10:32 AM, Pierre Racine <span dir="ltr"><<a href="mailto:Pierre.Racine@sbf.ulaval.ca">Pierre.Racine@sbf.ulaval.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> Thank you. It works great! The following works for a single point against a<br>
> single raster:<br>
><br>
> SELECT<br>
> ST_Value(rast, ST_SetSRID(ST_Point(187251.0, 119422.0), 26957)) FROM geol1<br>
> WHERE ST_Intersects(rast, ST_SetSRID(ST_Point(187251.0, 119422.0),<br>
> 26957)::geometry, 1);<br>
<br>
</div>It will work even faster if you retile everything to smaller tiles and create an index on your raster column (which I have no doubt you did). You can use the new ST_Tile() plpgsql prototype to retile everything without reloading:<br>
<br>
<a href="http://trac.osgeo.org/postgis/browser/trunk/raster/scripts/plpgsql/st_tile.sql" target="_blank">http://trac.osgeo.org/postgis/browser/trunk/raster/scripts/plpgsql/st_tile.sql</a><br>
<br>
It's a bit slow but can work overnight...<br>
<div class="im"><br>
> Could anyone recommend the best way to query multiple rasters using the same<br>
> point for each? I've seen examples pulling multiple points from the same rasters<br>
> but not the same point from multiple rasters. I have about 10-20 rasters (geol2,<br>
> geol3..) I need to find the value of at a single point.<br>
<br>
</div>If you have an application that want to do that often I would recommend to store all the tiles for all the layers in the same table with a column identifying the semantic of each set of tile. You then just do a query like you did, adding the point id and the semantic column. For each point you will get as many rows as you have layers. Transforming everything in a one multiple column row is another story: You have to JOIN the table with itself as many time as you have layers.<br>
<font color="#888888"><br>
Pierre<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div></div>