[postgis-users] ST_Mapalgebraexpr requires same alignment
Jose Carlos Martinez
jomarlla at cgf.upv.es
Fri Mar 23 07:49:09 PDT 2012
Hi Pierre, thanx for the answer.
I though same alignment was not required because the docs said the
alignment is chosen from first raster, then I guessed the second raster
could have different alignment. I guessed it can support different
alignment because otherwise I think its very limited, maybe Im doing
something wrong though but the normal scenario its to make spatial
analysis with raster which have different alignment.
How can I rewrite the sentence with raster which have different
alignment? or I should re-sample the whole raster to make them to have
the same alignment?
insert into demdif (rast) select st_mapalgebraexpr (d1.rast, 1, st_union
(d2.rast), 1, 'abs([rast1.val] - [rast2-val])','16BSI', 'FIRST', null,
null,null) from dem200 d1, dem d2 where d1.rast && d2.rast and st_relate
(d1.rast::geometry, d2.rast::geometry, 'T********') group by d1.rid;
On 23/03/2012 14:02, Pierre Racine wrote:
>> The resulted tiles are empty. Does ST_Mapalgebraexpr require same alignment?
>> According to the docs I guess not but then dont know why im getting that
>> message.
> What in the doc let you think that it does not require same alignment? Is does...
>
>> In another example I didnt use st_union with the same result.
>>
>> insert into demdif (rast) select st_mapalgebraexpr (d1.rast, 1, st_union (d2.rast),
>> 1, 'abs([rast1.val] - [rast2-val])','16BSI', 'FIRST', null,
>> null,null) from dem200 d1, dem d2 where d1.rast&& d2.rast and st_relate
>> (d1.rast::geometry, d2.rast::geometry, 'T********') group by d1.rid;
>>
>> Another issue is st_union (internally is st_mapalgebraexpr) is extremely slow. I
>> can not manage raster layers bigger than a couple of thousand pixel in x or y
>> even with 128 tiled blocks.
> Right. This is documented:
>
> http://postgis.org/documentation/manual-svn/RT_ST_Union.html
>
> Pierre
> _______________________________________________
> 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