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

Function: st_longestline

 

 

Schema

public

 

Owner

postgres

 

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
_ST_LongestLine(ST_ConvexHull($1), 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 13/03/2014 13:23
Previous topic Chapter index Next topic