Thank you. It works great! The following works for a single point against a single raster:
SELECT ST_Value(rast, ST_SetSRID(ST_Point(187251.0, 119422.0), 26957)) FROM geol1 WHERE ST_Intersects(rast, ST_SetSRID(ST_Point(187251.0, 119422.0), 26957)::geometry, 1); 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. - John *********************************************** John Callahan, Research Scientist Delaware Geological Survey, University of Delaware URL: http://www.dgs.udel.edu ************************************************* On Mon, Feb 20, 2012 at 4:29 PM, Pierre Racine <pierre.rac...@sbf.ulaval.ca>wrote: > Use ST_Intersects(raster, geometry) in the WHERE clause (as you would do > with geometries). > > Pierre > > > -----Original Message----- > > From: postgis-users-boun...@postgis.refractions.net [mailto: > postgis-users- > > boun...@postgis.refractions.net] On Behalf Of John Callahan > > Sent: Monday, February 20, 2012 4:28 PM > > To: PostGIS Users Discussion > > Subject: [postgis-users] postgis raster st_value > > > > Hopefully this is a question with a quick answer.... > > > > I have a few rasters loaded into PostGIS 2.0 alpha5. I loaded them with > tiles at > > 256x256 px (no real reason why I chose those dimensions.) When I run a > simple > > ST_Value() statement, returned is one record for each tile. And, of > course, every > > one of those will be blank except for the tile that contains the > location. Is there > > a way to return only the value, and not a full array of nearly empty > cells? (of > > course, only one value is returned when the raster is not-tiled but I'm > not sure if > > that's the way to go.) Thanks. > > > > > > - John > > > > *********************************************** > > John Callahan, Research Scientist > > Delaware Geological Survey, University of Delaware > > URL: http://www.dgs.udel.edu > > ************************************************* > > > > _______________________________________________ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users >
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users