pggeodb.nancy.inra.fr/db_toff - db_toff on pggeodb.nancy.inra.fr
Previous topic Chapter index Next topic

Function: st_max4ma

 

 

Schema

public

 

Owner

postgres

 

Descriptions

There is no description for function st_max4ma

 

Options

Option

Value

Returns

double precision

Language

plpgsql

Parameters

matrix double precision []

nodatamode text

variadic args text []

 

Definition

CREATE OR REPLACE FUNCTION public.st_max4ma (
 matrix double precision [],
 nodatamode text,
 variadic args text []
)
RETURNS double precision AS
$span$
   DECLARE

       _matrix float[][];
       max float;
   BEGIN
       _matrix := matrix;
       max := '-Infinity'::float;
       FOR x in array_lower(_matrix, 1)..array_upper(_matrix, 1) LOOP
           FOR y in array_lower(_matrix, 2)..array_upper(_matrix, 2) LOOP
               IF _matrix[x][y] IS NULL THEN
                   IF
NOT nodatamode = 'ignore' THEN
                       _matrix[x][y] := nodatamode::float;
                   END IF;
               END IF;
               IF max < _matrix[x][y] THEN
                   max := _matrix[x][y];
               END IF;
           END LOOP;
       END LOOP;
       RETURN max;
   END;
$span$
LANGUAGE
'plpgsql'
IMMUTABLE
CALLED ON NULL INPUT
SECURITY INVOKER
COST
100;

This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 13/03/2014 13:23
Previous topic Chapter index Next topic