Package: diblogeo
Diblo Geo is a Python 2 api for developer.Diblo Geo makes it easy for Python developers to calculate coordinates and bearing across the globe.Diblo Geo is tested against CPython 2.7.Development site.© Diblo Geo contributors 2016 under theThe GNU General Public License v3.0.InstallationInstall usingpipwith:pip install diblogeoOr,download a wheel or source archive from PyPI.Measuring DistancesExample 1:>>> from diblogeo import Geo
>>> distance = Geo((55.3303636516, 10.4466164796)) \
...            .distance((55.3706593849, 10.469825563))
>>> print(distance)
4.70941600331
>>> print(distance.kilometers)
4.71
>>> print(distance.feet)
15450.84Example 2 (Altitude 11.34 meters):>>> from diblogeo import Geo
>>> distance = Geo((55.3303636516, 10.4466164796, 11.34)) \
...            .distance((55.3706593849, 10.469825563, 11.34))
>>> print(distance)
4.71780808395
>>> print(distance.kilometers)
4.72
>>> print(distance.feet)
15478.37Measuring Angles>>> from diblogeo import Geo
>>> bearing = Geo((55.3303636516, 10.4466164796)) \
...           .bearing((55.3706593849, 10.469825563))
>>> print(bearing)
18.1225041609
>>> print(bearing.degrees)
18.12
>>> print(bearing.radians)
0.316297366315Projecting DestinationsExample 1:>>> from diblogeo import Geo
>>> point = Geo((55.3303636516, 10.4466164796))
>>> point.destination(37.2, 3.2)
(55.3533088458, 10.4772564424, 0)
>>> point.destination(bearing=37.2, kilometers=3.2)
(55.3533088458, 10.4772564424, 0)
>>> point.destination(37.2, meters=3200)
(55.3533088458, 10.4772564424, 0)Example 2 (Altitude 11.34 meters):>>> from diblogeo import Geo
>>> point = Geo((55.3303636516, 10.4466164796, 11.34))
>>> point.destination(37.2, 3.2)
(55.3532680374, 10.4772019082, 11.34)
>>> point.destination(bearing=37.2, kilometers=3.2)
(55.3532680374, 10.4772019082, 11.34)
>>> point.destination(37.2, meters=3200)
(55.3532680374, 10.4772019082, 11.34)Calculate Earth’s Radius>>> from diblogeo import calc_earth_radius
>>> earth_radius = calc_earth_radius((55.3303636516, 10.4466164796, 11.34))
>>> print(earth_radius)
6375.05118755
>>> print(earth_radius.kilometers)
6375.05
>>> print(earth_radius.miles)
3961.27More input and output methods>>> from diblogeo import Geo
>>> location = Geo(("55° 19' 49.31\"", "10° 26' 47.82\"", 11.34)) \
...            .destination(37.2, miles=3.2)
>>> print(location.latitude, location.longitude, location.altitude)
(55.367221177288684, 10.495856496671713, 11.34)
>>> print(location[0], location[1], location[2])
(55.367221177288684, 10.495856496671713, 11.34)
>>> print(location.dms)
((55, 22, 1.99624, 'N'), (10, 29, 45.08339, 'E'), 11.34)
>>> print(location.dms.latitude, location.dms.longitude, location.altitude)
((55, 22, 1.99624, 'N'), (10, 29, 45.08339, 'E'), 11.34)Locations/ Points AttributesThe attributes can be used withGeoanddestination.Decimal Degrees:location, loc, ddlatitude, latlongitude, lonelevations, altitude, altlocation,locandddreturn an instance of_Point[_Point].latitude, [_Point].lat[_Point].longitude, [_Point].lon[_Point].elevations, [_Point].altitude, [_Point].altDegrees Minutes Seconds:dmsdms.latitude, dms.latdms.longitude, dms.londms.elevations, dms.altitude, dms.altUnit of measurementThe attributes can be used withdistanceandcalc_earth_radius.Destinationsupports all the units as distance argument.kilometers, kmmeters, mcmmiles, mifeet, ftnautical, nm, nmiAngle UnitsThe attributes can be used withbearing.degrees, degradians, rad