Schema
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 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 07/12/2018 13:23 |