Schema
Owner
postgres
Descriptions
args: geomlonlatA, geomlonlatB - Returns minimum distance in meters between two lon/lat geometries. Uses a spherical earth and radius derived from the spheroid defined by the SRID. Faster than ST_DistanceSpheroid , but less accurate. PostGIS versions prior to 1.5 only implemented for points.
Options
Option | Value |
---|---|
Returns |
double precision |
Language |
sql |
Parameters |
geom1 public.geometry geom2 public.geometry |
Definition
CREATE OR REPLACE FUNCTION public.st_distancesphere (
geom1 public.geometry,
geom2 public.geometry
)
RETURNS double precision AS
$span$
select st_distance(geography($1),geography($2),false)
$span$
LANGUAGE 'sql'
IMMUTABLE
RETURNS NULL ON NULL INPUT
SECURITY INVOKER
COST 300;
COMMENT ON FUNCTION public.st_distancesphere(geom1 public.geometry, geom2 public.geometry)
IS 'args: geomlonlatA, geomlonlatB - Returns minimum distance in meters between two lon/lat geometries. Uses a spherical earth and radius derived from the spheroid defined by the SRID. Faster than ST_DistanceSpheroid , but less accurate. PostGIS versions prior to 1.5 only implemented for points.';
This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 13/03/2014 13:23 |