I am testing the PostGIS map algebra (
ST_MapAlgebra) on two different raster tables.
Each table contains a single image/row. They have the same SRID but different, overlapping extents and different ground resolution. What I did was:
SELECT ST_MapAlgebra(t1.rast,t2.rast ,'([rast1]+0.001)/([rast2]+0.001)') AS rast FROM t1, t2
And I got an error saying that
rt_raster_iterator: The set of rasters provided (custom extent included, if appropriate) do not have the same alignment
Now, what I want to do is to resample
t2.rast to their common area (i.e. intersection) at the higher resolution of the two rasters.
Is there a function for this in PostGIS (2.1+)? and, if not, how should I go about making such a query?
I looked at ST_REsample, and it seems that it can only sample one image to the reference grid of another. Also, the documentation says that it does not handle SRID since PostGIS 2.1.