[postgis-users] Add bands to a raster

SIG CEN L-R sig at cenlr.org
Wed Feb 13 07:31:38 PST 2013


Goog morning Pierre, 

yes, it works. 

Thank's a lot! 


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


----- Mail original -----

De: "Pierre Racine" <Pierre.Racine at sbf.ulaval.ca> 
À: "Mathieu Bossaert (CEN L-R)" <sig at cenlr.org>, "PostGIS Users Discussion" <postgis-users at lists.osgeo.org> 
Envoyé: Mercredi 13 Février 2013 16:01:14 
Objet: RE: [postgis-users] Add bands to a raster 

That looks good. does it work? 

> -----Original Message----- 
> From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users- 
> bounces at lists.osgeo.org] On Behalf Of SIG CEN L-R 
> Sent: Monday, February 11, 2013 5:42 PM 
> To: postgis-users at lists.osgeo.org 
> Subject: [postgis-users] Add bands to a raster 
> 
> 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 <http://si.cenlr.org/> du CEN L-R 
> 04 67 29 90 65 - sig at cenlr.org 
> <http://sig.cenlr.org/_media/signature-courriel_mathieu.jpg> 
> 
> ________________________________ 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130213/4c2ab1be/attachment.html>


More information about the postgis-users mailing list