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

Function: st_dwithin

 

 

Schema

public

 

Owner

postgres

 

Descriptions

args: rastA, nbandA, rastB, nbandB, distance_of_srid - Return true if rasters rastA and rastB are within the specified distance of each other.

 

Options

Option

Value

Returns

boolean

Language

sql

Parameters

rast1 public.raster

nband1 integer

rast2 public.raster

nband2 integer

distance double precision

 

Definition

CREATE OR REPLACE FUNCTION public.st_dwithin (
 rast1 public.raster,
 nband1 integer,
 rast2 public.raster,
 nband2 integer,
 distance double precision
)
RETURNS boolean AS
$span$
SELECT
$1::geometry && ST_Expand(ST_ConvexHull($3), $5) AND $3::geometry && ST_Expand(ST_ConvexHull($1), $5) AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN _st_dwithin(st_convexhull($1), st_convexhull($3), $5) ELSE _st_dwithin($1, $2, $3, $4, $5) END
$span$
LANGUAGE
'sql'
IMMUTABLE
CALLED ON NULL INPUT
SECURITY INVOKER
COST
1000;

COMMENT ON FUNCTION public.st_dwithin(rast1 public.raster, nband1 integer, rast2 public.raster, nband2 integer, distance double precision)
IS 'args: rastA, nbandA, rastB, nbandB, distance_of_srid - Return true if rasters rastA and rastB are within the specified distance of each other.';

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