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

Function: st_tpi

 

 

Schema

public

 

Owner

albenard

 

Descriptions

There is no description for function st_tpi

 

Options

Option

Value

Returns

public.raster

Language

plpgsql

Parameters

rast public.raster

nband integer

customextent public.raster

pixeltype text = '32BF'::text

interpolate_nodata boolean = false

 

Definition

CREATE OR REPLACE FUNCTION public.st_tpi (
 rast public.raster,
 nband integer,
 customextent public.raster,
 pixeltype text = '32BF'::text,
 interpolate_nodata boolean = false
)
RETURNS public.raster AS
$span$
DECLARE

_rast raster;
_nband integer;
_pixtype text;
_pixwidth double precision;
_pixheight double precision;
_width integer;
_height integer;
_customextent raster;
_extenttype text;
BEGIN
_customextent := customextent;
IF _customextent IS NULL THEN
_extenttype := 'FIRST';
ELSE
_extenttype := 'CUSTOM';
END IF;

IF interpolate_nodata IS TRUE THEN
_rast := public.ST_MapAlgebra(
ARRAY[ROW(rast, nband)]::rastbandarg[],
'st_invdistweight4ma(double precision[][][], integer[][], text[])'::regprocedure,
pixeltype,
'FIRST', NULL,
1, 1
);
_nband := 1;
_pixtype := NULL;
ELSE
_rast := rast;
_nband := nband;
_pixtype := pixeltype;
END IF;

-- get properties
_pixwidth := public.ST_PixelWidth(_rast);
_pixheight := public.ST_PixelHeight(_rast);
SELECT width, height INTO _width, _height FROM public.ST_Metadata(_rast);

RETURN public.ST_MapAlgebra(
ARRAY[ROW(_rast, _nband)]::rastbandarg[],
' public._ST_tpi4ma(double precision[][][], integer[][], text[])'::regprocedure,
_pixtype,
_extenttype, _customextent,
1, 1);
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 26/02/2014 11:51
Previous topic Chapter index Next topic