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

lon1
Required

Longitude of point 1.

lat1
float
Required

Latitude of point 1.

lon2
float
Required

Longitude of point 2.

lat2
float
Required

Latitude of point 2.

Returns

Return True if the two points are close.

Return type

get_distance

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

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

Parameters

lon1
float
Required

Longitude of point 1.

lat1
float
Required

Latitude of point 1.

lon2
float
Required

Longitude of point 2.

lat2
float
Required

Latitude of point 2.

Returns

The spherical distance between the two points.

Return type