Dear all,

I'm writing a stored procedure (pgplSQL) that uses postgis functions version 2.1 Dump the contents of an image on a two-dimensional array and then I update the cells according to some calculations. The process is slow, but after a while I discovered devote to the problem, or the slowness is due to operations that read and update the two-dimensional array.

The code is roughly this:

DECLARE
..
*img***double precision [] [];

i integer j integer;

BEGIN

select ST_DumpValues (rast, 1, false) INTO *img***from ..

for i IN 1 .. 1000 LOOP
for j IN 1 .. 500 LOOP
........
*img***[i] [j]: = ..............;
END LOOP;
END LOOP;

select ST_SetValues (image, 1, 1, 1, *img*) INTO imagen2;
....
END;

Anyone know why the update of the values of the two-dimensional array is slow?, Poorly defined array for the type of operations performed?

thank you very much
Best regards.

Miguel A. Manso
_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to