[postgis-devel] ST_MapAlgebraExpr(): Raster aggregates?

Tom van Tilburg tom.van.tilburg at gmail.com
Mon Nov 21 02:04:38 PST 2011


Pierre,

Thanks a lot for pointing me out this.
I've looked in to the plpgsql code but I'm afraid my current knowledge 
(or time) doesn't allow me to contribute code.

However, I tested the prototype of ST_Union. It appears to be rather 
buggy (typo's). Has it ever been applied/tested?
(eg: 'ERROR:  parameter name "p_nodata1expr" used more than once. '
seems to be copy paste error.)

Chrs,
  Tom

On 18-11-2011 16:54, Pierre Racine wrote:
> I would even suggest you write a plpgsql prototype for ST_UnionToRaster() based on the specifications.... ...if you have time for sure.
>
> I would be glad to add it in the plpgsql/script on the trunk. It then becomes the reference for a future C implementation.
>
> Pierre
>
>> -----Original Message-----
>> From: postgis-devel-bounces at postgis.refractions.net [mailto:postgis-devel-
>> bounces at postgis.refractions.net] On Behalf Of Pierre Racine
>> Sent: Friday, November 18, 2011 10:39 AM
>> To: PostGIS Development Discussion
>> Subject: Re: [postgis-devel] ST_MapAlgebraExpr(): Raster aggregates?
>>
>> Tom,
>>
>> Look at the plpgsql prototype of ST_Union(raster) in
>>
>> http://trac.osgeo.org/postgis/browser/trunk/raster/scripts/plpgsql/st_union.sql
>>
>> Have a look also at the specifications of ST_UnionToRaster(geometry, val) in
>>
>> http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking03
>>
>> Everything is based on ST_MapAlgebraExpr(raster, raster, expr) and should do
>> exactly what you want.
>>
>> It should be ok for producing low resolution raster as our first implementation of
>> ST_MapAlgebraExpr(raster, raster) process pixel by pixel. Higher resolution will
>> need an optimized version of ST_MapAlgebra(raster, raster) copying large areas
>> of raster values when possible (it is exactly what we need for unioning two
>> rasters efficiently). We started to make a plpgsql prototype for this optimized
>> version but it is not finished
>> (http://trac.osgeo.org/postgis/browser/trunk/raster/scripts/plpgsql/st_mapalge
>> bra_optimized.sql). I guess we will need some funding to make it happen...
>>
>> Let me know about your experiments...
>>
>> Pierre
>>




More information about the postgis-devel mailing list