Skip to contents

Returns if two POINT_2D's are within a target distance in meters, using an ellipsoidal model of the earths surface

The input geometry is assumed to be in the EPSG:4326 coordinate system (WGS84), with [latitude, longitude] axis order and the distance is returned in meters. This function uses the GeographicLib library to solve the inverse geodesic problem, calculating the distance between two points using an ellipsoidal model of the earth. This is a highly accurate method for calculating the distance between two arbitrary points taking the curvature of the earths surface into account, but is also the slowest.

Usage

ST_DWithin_Spheroid(p1, p2, distance)

Arguments

p1

POINT_2D

p2

POINT_2D

distance

DOUBLE

Value

BOOLEAN

Provided by

The spatial extension (LOAD spatial;).