Opened 6 years ago

Last modified 4 years ago

#4208 new defect

Single geometry versions of ST_MaxDistance and ST_LongestLine

Reported by: komzpa Owned by: komzpa
Priority: medium Milestone: PostGIS Fund Me
Component: postgis Version: 2.4.x
Keywords: Cc:

Description

Sometimes you need to calculate MaxDistance over a MultiPoint you got by collecting some inputs, a longest diagonal of a polygon or something similar. In this case a single-argument of ST_MaxDistance or ST_LongestLine will be beneficial.

Change History (5)

comment:1 by nicklas, 6 years ago

You mean something like

CREATE OR REPLACE FUNCTION public.st_maxdistance(
    geom1 geometry)
  RETURNS double precision AS
	'SELECT ST_maxdistance($1, $1)'
  LANGUAGE sql IMMUTABLE
  COST 100;

comment:2 by komzpa, 6 years ago

yes, exactly. plus documentation, plus check qualifiers (_PARALLEL).

comment:3 by pramsey, 5 years ago

Milestone: PostGIS 3.0.0PostGIS 3.1.0

comment:4 by komzpa, 4 years ago

Owner: changed from pramsey to komzpa

comment:5 by komzpa, 4 years ago

Milestone: PostGIS 3.1.0PostGIS Fund Me
Note: See TracTickets for help on using tickets.