[postgis-users] ST_Mapalgebra

Bborie Park bkpark at ucdavis.edu
Tue Nov 22 09:31:25 PST 2011


On Tue, Nov 22, 2011 at 9:27 AM, Joan <wamaithajoan at gmail.com> wrote:
> Hi,
>
> How can I perform ST_MapAlgebraExpr with raster layers that have different
> scale_x, scale_y. I suppose that the difference causes the two raster layers
> to be aligned differently
> Joan

Joan,

You'll need to resample one of the rasters to be aligned with the
other raster.  Something like:

ST_Resample(rast2, rast1)

That'll resample rast2 to be aligned with rast1.  So, you should be
able to use that with ST_MapAlgebraExpr...

ST_MapAlgebraExpr(rast1, ST_Resample(rast2, rast1), ...)

-bborie

-- 
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkpark at ucdavis.edu



More information about the postgis-users mailing list