RCAIDE.Library.Methods.Geodesics.Geodesics.Geodesic_Calculate#
- class Geodesic_Calculate(*args, **kwargs)[source]#
Bases:
Distance
Calculate the geodesic distance between points.
Set which ellipsoidal model of the earth to use by specifying an
ellipsoid
keyword argument. The default is ‘WGS-84’, which is the most globally accurate model. Ifellipsoid
is a string, it is looked up in the ELLIPSOIDS dictionary to obtain the major and minor semiaxes and the flattening. Otherwise, it should be a tuple with those values. See the comments above the ELLIPSOIDS dictionary for more information.Example:
>>> from geopy.distance import geodesic >>> newport_ri = (41.49008, -71.312796) >>> cleveland_oh = (41.499498, -81.695391) >>> print(geodesic(newport_ri, cleveland_oh).miles) 538.390445368
- __init__(*args, **kwargs)[source]#
There are 3 ways to create a distance:
From kilometers:
>>> from geopy.distance import Distance >>> Distance(1.42) Distance(1.42)
From points (for non-abstract distances only), calculated as a sum of distances between all points:
>>> from geopy.distance import geodesic >>> geodesic((40, 160), (40.1, 160.1)) Distance(14.003702498106215) >>> geodesic((40, 160), (40.1, 160.1), (40.2, 160.2)) Distance(27.999954644813478)
Methods
__init__
(*args, **kwargs)There are 3 ways to create a distance:
measure
(a, b)set_ellipsoid
(ellipsoid)Attributes
- __init__(*args, **kwargs)[source]#
There are 3 ways to create a distance:
From kilometers:
>>> from geopy.distance import Distance >>> Distance(1.42) Distance(1.42)
From points (for non-abstract distances only), calculated as a sum of distances between all points:
>>> from geopy.distance import geodesic >>> geodesic((40, 160), (40.1, 160.1)) Distance(14.003702498106215) >>> geodesic((40, 160), (40.1, 160.1), (40.2, 160.2)) Distance(27.999954644813478)