Thank you. It works great! The following works for a single point against a single raster:<div><br></div><div><div>SELECT </div><div>ST_Value(rast, ST_SetSRID(ST_Point(187251.0, 119422.0), 26957)) </div><div>FROM geol1 </div>
<div>WHERE ST_Intersects(rast, ST_SetSRID(ST_Point(187251.0, 119422.0), 26957)::geometry, 1);</div><div><br></div><div><br></div><div>Could anyone recommend the best way to query multiple rasters using the same point for each? I've seen examples pulling multiple points from the same rasters but not the same point from multiple rasters. I have about 10-20 rasters (geol2, geol3..) I need to find the value of at a single point.</div>
<div><br></div><div><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 Mon, Feb 20, 2012 at 4:29 PM, 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">
Use ST_Intersects(raster, geometry) in the WHERE clause (as you would do with geometries).<br>
<br>
Pierre<br>
<div><div></div><div class="h5"><br>
> -----Original Message-----<br>
> From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a> [mailto:<a href="mailto:postgis-users-">postgis-users-</a><br>
> <a href="mailto:bounces@postgis.refractions.net">bounces@postgis.refractions.net</a>] On Behalf Of John Callahan<br>
> Sent: Monday, February 20, 2012 4:28 PM<br>
> To: PostGIS Users Discussion<br>
> Subject: [postgis-users] postgis raster st_value<br>
><br>
> Hopefully this is a question with a quick answer....<br>
><br>
> I have a few rasters loaded into PostGIS 2.0 alpha5. I loaded them with tiles at<br>
> 256x256 px (no real reason why I chose those dimensions.) When I run a simple<br>
> ST_Value() statement, returned is one record for each tile. And, of course, every<br>
> one of those will be blank except for the tile that contains the location. Is there<br>
> a way to return only the value, and not a full array of nearly empty cells? (of<br>
> course, only one value is returned when the raster is not-tiled but I'm not sure if<br>
> that's the way to go.) Thanks.<br>
><br>
><br>
> - John<br>
><br>
> ***********************************************<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>
</div></div>_______________________________________________<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>
</blockquote></div><br></div></div>