[postgis-users] WKT Raster
Pierre Racine
Pierre.Racine at sbf.ulaval.ca
Sat Oct 1 06:15:00 PDT 2011
We should probably at some point provide a ST_SetValues(raster, ARRAY[values]). Would this help?
Pierre
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of Volkmar Herbst privat
> Sent: Tuesday, September 27, 2011 3:54 PM
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] WKT Raster
>
> Hi all,
> I have a question concerning the creation of a raster in a plr function. I create a
> empty raster and set the pixel values individually with update
> queries:
>
> for(i in 1:nrow(mat_p)) {
> for(j in 1:ncol(mat_p)) {
> pg.spi.exec(sprintf ("UPDATE nutrients.applications SET raster =
> ST_SetValue(raster,%s, %s, %s,%s) WHERE id = %s ;", 3, j, i, mat_cao[i,j],
> rid))
> }
> }
>
> This takes quite a long time..
> Does anyone know an alternative approach to create a WKT- Raster in R directly
> without setting each pixel value and export it to a Postgis table?
> Or is it possible to write the binary raster somehow?
> Any hints are most welcome,
>
> Volkmar
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list