[postgis-users] ST_Value on tiled raster
Nordgren, Bryce L -FS
bnordgren at fs.fed.us
Tue Apr 21 10:10:01 PDT 2015
Hi Carl,
I may be reading too much into your message, but my spidey sense tells me you might be using ST_Value inside a loop to get values to put in an equation (or to evaluate thresholds), thereby constructing an output raster. If this is the case, a more efficient way to proceed may be to use ST_MapAlgebra (for equations), or ST_Reclass (for thresholds). No muss no fuss.
Hope that helps,
Bryce
From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Albury, Carl -FS
Sent: Tuesday, April 21, 2015 10:18 AM
To: postgis-users at lists.osgeo.org
Subject: Re: [postgis-users] ST_Value on tiled raster
Hi
I'm new to PostGIS so please bear with me.
I'm working with MODIS data that I tiled using the auto tile switch in raster2pgsql resulting in 13250 82x94 tiles.
When I try to query for pixel values using ST_Value, such as:
SELECT
ST_Value(rast, 2, 1,1) -- multiband raster
FROM
MODIS_test;
I get a value for each tile, not for each pixel (I assume the value is for the first pixel in the tile?).
If I want to query each pixel do I need to loop through each tile and have a sub loop for each pixel in that tile? If so I can't figure out the syntax to designate the tiles vs pixels.
Thanks very much,
Carl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150421/ea746a9a/attachment.html>
More information about the postgis-users
mailing list