EnricherLocationSelector Class

Defines base location calculations for location enricher selectors.

Location calculation methods are static member functions.

Inheritance
EnricherLocationSelector

Constructor

EnricherLocationSelector()

Methods

close_to

Check whether given two points are close enough.

Differences of latitude and longitude both less than 10 degrees return True.

get_distance

Calculate the spherical distance between two points specified by a longitude and latitude.

close_to

Check whether given two points are close enough.

Differences of latitude and longitude both less than 10 degrees return True.

static close_to(lon1, lat1, lon2, lat2) -> bool

Parameters

Name Description
lon1
Required

Longitude of point 1.

lat1
Required

Latitude of point 1.

lon2
Required

Longitude of point 2.

lat2
Required

Latitude of point 2.

Returns

Type Description

Return True if the two points are close.

get_distance

Calculate the spherical distance between two points specified by a longitude and latitude.

static get_distance(lon1, lat1, lon2, lat2) -> float

Parameters

Name Description
lon1
Required

Longitude of point 1.

lat1
Required

Latitude of point 1.

lon2
Required

Longitude of point 2.

lat2
Required

Latitude of point 2.

Returns

Type Description

The spherical distance between the two points.