EnricherLocationSelector class

Definition

Location related fundamental calculations are static member functions.

Inheritance
builtins.object
EnricherLocationSelector

Methods

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

Check whether given two points are close enough.

Say, the differences of latitude and longitude are both less than 10 degree.

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

Calculate the spherical distance between two points (latitude, longitude).

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

Check whether given two points are close enough.

Say, the differences of latitude and longitude are both less than 10 degree.

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

Parameters

lon1

longitude of point 1

lat1

latitude of ooint 1

lon2

longitude of point 2

lat2

latitude of ooint 2

Returns

True if they're close

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

Calculate the spherical distance between two points (latitude, longitude).

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

Parameters

lon1

longitude of point 1

lat1

latitude of ooint 1

lon2

longitude of point 2

lat2

latitude of ooint 2

Returns

the spherical distance