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

Function: st_longestline

 

 

Schema

public

 

Owner

albenard

 

Descriptions

args: g1, g2 - Returns the 2-dimensional longest line points of two geometries. The function will only return the first longest line if more than one, that the function finds. The line returned will always start in g1 and end in g2. The length of the line this function returns will always be the same as st_maxdistance returns for g1 and g2.

 

Options

Option

Value

Returns

public.geometry

Language

sql

Parameters

geom1 public.geometry

geom2 public.geometry

 

Definition

CREATE OR REPLACE FUNCTION public.st_longestline (
 geom1 public.geometry,
 geom2 public.geometry
)
RETURNS public.geometry AS
$span$
SELECT public
._ST_LongestLine(public.ST_ConvexHull($1), public.ST_ConvexHull($2))
$span$
LANGUAGE
'sql'
IMMUTABLE
RETURNS NULL ON NULL INPUT
SECURITY INVOKER
COST
100;

COMMENT ON FUNCTION public.st_longestline(geom1 public.geometry, geom2 public.geometry)
IS 'args: g1, g2 - Returns the 2-dimensional longest line points of two geometries. The function will only return the first longest line if more than one, that the function finds. The line returned will always start in g1 and end in g2. The length of the line this function returns will always be the same as st_maxdistance returns for g1 and g2.';

This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 26/02/2014 11:51
Previous topic Chapter index Next topic