Schema
Owner
postgres
Descriptions
There is no description for function st_tpi
Options
Option | Value |
---|---|
Returns |
public.raster |
Language |
|
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 := 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 := ST_PixelWidth(_rast);
_pixheight := ST_PixelHeight(_rast);
SELECT width, height INTO _width, _height FROM ST_Metadata(_rast);
RETURN ST_MapAlgebra(
ARRAY[ROW(_rast, _nband)]::rastbandarg[],
'_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 13/03/2014 13:23 |