class CRM_Contact_BAO_ProximityQuery

Properties

static protected $_earthFlattening Trigonometry for calculating geographical distances.
static protected $_earthRadiusSemiMinor
static protected $_earthRadiusSemiMajor
static protected $_earthEccentricitySQ

Methods

static 
initialize()

No description

static float
earthRadius(float $latitude)

Estimate the Earth's radius at a given latitude.

static array
earthXYZ(float $longitude, float $latitude, float|int $height)

Convert longitude and latitude to earth-centered earth-fixed coordinates.

static float
earthArcLength(float $angle, float $latitude)

Convert a given angle to earth-surface distance.

static array
earthLongitudeRange(float $longitude, float $latitude, float $distance)

Estimate the min and max longitudes within $distance of a given location.

static array
earthLatitudeRange(float $longitude, float $latitude, float $distance)

Estimate the min and max latitudes within $distance of a given location.

static string
where(float $latitude, float $longitude, float $distance, string $tablePrefix = 'civicrm_address')

No description

static null
process(CRM_Contact_BAO_Query $query, array $values)

Process form.

static null
fixInputParams(array $input)

No description

Details

at line 58
static initialize()

at line 84
static float earthRadius(float $latitude)

Estimate the Earth's radius at a given latitude.

Default to an approximate average radius for the United States.

Parameters

float $latitude

Return Value

float

at line 102
static array earthXYZ(float $longitude, float $latitude, float|int $height)

Convert longitude and latitude to earth-centered earth-fixed coordinates.

X axis is 0 long, 0 lat; Y axis is 90 deg E; Z axis is north pole.

Parameters

float $longitude
float $latitude
float|int $height

Return Value

array

at line 127
static float earthArcLength(float $angle, float $latitude)

Convert a given angle to earth-surface distance.

Parameters

float $angle
float $latitude

Return Value

float

at line 139
static array earthLongitudeRange(float $longitude, float $latitude, float $distance)

Estimate the min and max longitudes within $distance of a given location.

Parameters

float $longitude
float $latitude
float $distance

Return Value

array

at line 171
static array earthLatitudeRange(float $longitude, float $latitude, float $distance)

Estimate the min and max latitudes within $distance of a given location.

Parameters

float $longitude
float $latitude
float $distance

Return Value

array

at line 215
static string where(float $latitude, float $longitude, float $distance, string $tablePrefix = 'civicrm_address')

Parameters

float $latitude
float $longitude
float $distance
string $tablePrefix

Return Value

string

at line 263
static null process(CRM_Contact_BAO_Query $query, array $values)

Process form.

Parameters

CRM_Contact_BAO_Query $query
array $values

Return Value

null

Exceptions

Exception

at line 372
static null fixInputParams(array $input)

Parameters

array $input retun void

Return Value

null