#1281 closed enhancement (fixed)
[raster] ST_MapAlgebraFct for two rasters
Reported by: | Bborie Park | Owned by: | Bborie Park |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 2.0.0 |
Component: | raster | Version: | master |
Keywords: | history | Cc: |
Description
The sibling to 2-raster ST_MapAlgebraExpr. Instead of a set of expressions, use a function call.
- st_mapalgebrafct(
rast1 raster, band1 integer, rast2 raster, band2 integer, userfunction regprocedure, pixeltype text DEFAULT NULL, extenttype text DEFAULT 'INTERSECTION', VARIADIC userargs text[] DEFAULT NULL
- st_mapalgebrafct(
rast1 raster, rast2 raster, userfunction regprocedure, pixeltype text DEFAULT NULL, extenttype text DEFAULT 'INTERSECTION', VARIADIC userargs text[] DEFAULT NULL
)
- st_mapalgebrafct(
rast1 raster, rast2 raster, userfunction regprocedure, VARIADIC userargs text[]
)
It'll be interesting to compare performance between this function and ST_MapAlgebraExpr.
Change History (7)
comment:1 by , 13 years ago
Component: | postgis → postgis raster |
---|---|
Status: | new → assigned |
comment:2 by , 13 years ago
comment:3 by , 13 years ago
I'm suspecting that 2-raster ST_MapAlgebraFct will still be faster than 2-raster ST_MapAlgebraExpr. I'll be committing the code shortly. Development went quickly as both ST_MapAlgebraExpr and ST_MapAlgebraFct call the same underlying function, RASTER_mapAlgebra2.
comment:5 by , 13 years ago
That's just my hunch as to the performance. I've yet to compare the two as I'm just finishing up regression testing and valgrinding. All expressions are prepared in 2-raster ST_MapAlgebraExpr unless the expression has no parameters (which would cause the process to crash).
comment:6 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:7 by , 13 years ago
Keywords: | history added |
---|
I guess performance will be comparable only if you PREPARE the query parsing the expression in ST_MapAlgebraExpr. I did some test with the one raster version (which was not PREPARING the query at the moment) and ST_MapAlgebraFct was 7 time ST_MapAlgebraExpr for the same expression.