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

Function: st_distancesphere

 

 

Schema

public

 

Owner

albenard

 

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 public
.ST_distance( public.geography($1), public.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 26/02/2014 11:51
Previous topic Chapter index Next topic