[postgis-users] Add bands to a raster

SIG CEN L-R sig at cenlr.org
Mon Feb 11 14:41:59 PST 2013


Good evening, 

I would like to apply what I red from Pierre Racine about the way to add a band to a raster from another one. 
http://geospatialelucubrations.blogspot.fr/2012/09/loading-many-rasters-into-separate.html?showComment=1346973298820#c4654958992264542142 

I have 3 tables all tiled the same way. 
The first one "altitude", the second one "temp_min" and the third one "temp_max" 

In order to facilitate analyses, I would like to add 2 bands to the raster "altitude" 

I translate what I understood from Mr Racine like this, could someone tell me if I am wrong ? 

UPDATE altitude SET rast=ST_AddBand(altitude.rast, min.rast) 
FROM temperature_min min 
WHERE ST_UpperLeftX(min.rast) = ST_UpperLeftX(altitude.rast) 
AND ST_UpperLeftY(min.rast) = ST_UpperLeftY(altitude.rast); 

UPDATE altitude SET rast=ST_AddBand(altitude.rast, max.rast) 
FROM temperature_max max 
WHERE ST_UpperLeftX(max.rast) = ST_UpperLeftX(altitude.rast) 
AND ST_UpperLeftY(max.rast) = ST_UpperLeftY(altitude.rast); 

Thanks a lot! 

Mathieu Bossaert 

-- 
Mathieu BOSSAERT 
Responsable du système d'information du CEN L-R 
04 67 29 90 65 - sig at cenlr.org 

----- Mail original -----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130211/22604e73/attachment.html>


More information about the postgis-users mailing list