Divisions by zero shouldn't happen as far as I know, at most it should
give you null data as return.
Sounds like a bug.
Perhaps you can check:
http://trac.osgeo.org/postgis/browser/trunk/raster/scripts/plpgsql/st_summarystatsagg.sql
at line 69 it says: "($1).sum / ($1).count"
my guess is that that's where the division by 0 happens.
(it means probably that there is an empty raster somewhere in your
results that consequently leads to count() = 0 )
You can find the same code in your database functions ofcourse.
Good luck!
Tom
On 19-12-2011 10:53, Andreas Forø Tollefsen wrote:
Updated to latest trunk, and now it works.
However, I ran into a new "division by zero" error. This halts the query.
Could it be that something is divided by integer rather than decimal
in the query, or what else causes this:
ERROR: division by zero
CONTEXT: PL/pgSQL function "raster_summarystatsfinal" line 5 at
assignment
********** Error **********
ERROR: division by zero
SQL state: 22012
Context: PL/pgSQL function "raster_summarystatsfinal" line 5 at assignment
Best,
Andreas
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users