geo Package¶
geo
Package¶
bathymetry
Module¶
Class to handle bathymetry information and distance to coast.
copyright:  Copyright 2013 Ifremer / Cersat. 

license:  Released under GPL v3 license, see license. 
greatcircle
Module¶

class
cerbere.geo.greatcircle.
GreatCircle
(rmajor, rminor, lon1, lat1, lon2, lat2)[source]¶ Bases:
object
formula for perfect sphere from Ed Williams’ ‘Aviation Formulary’ (http://williams.best.vwh.net/avform.htm)
code for ellipsoid posted to GMT mailing list by Jim Leven in Dec 1999
Contact: Jeff Whitaker <jeffrey.s.whitaker@noaa.gov>
Define a great circle by specifying: rmajor  radius of major axis of ellipsoid rminor  radius of minor axis of ellipsoid. lon1  starting longitude of great circle lat1  starting latitude lon2  ending longitude lat2  ending latitude All must be given in degrees.
Instance variables: distance  distance along great circle in radians. lon1,lat1,lon2,lat2  start and end points (in radians).

a
= 6378137.0¶

b
= 6356752.3142¶

f
= 0.0033528106718309896¶

points
(npoints)[source]¶ compute arrays of npoints equally spaced intermediate points along the great circle.
input parameter npoints is the number of points to compute.
Returns lons, lats (lists with longitudes and latitudes of intermediate points in degrees).
For example npoints=10 will return arrays lons,lats of 10 equally spaced points along the great circle.


cerbere.geo.greatcircle.
vinc_dist
(f, a, phi1, lembda1, phi2, lembda2)[source]¶ Returns the distance between two geographic points on the ellipsoid and the forward and reverse azimuths between these points. lats, longs and azimuths are in radians, distance in metres
Returns ( s, alpha12, alpha21 ) as a tuple

cerbere.geo.greatcircle.
vinc_pt
(f, a, phi1, lembda1, alpha12, s)[source]¶ Returns the lat and long of projected point and reverse azimuth given a reference point and a distance and azimuth to project. lats, longs and azimuths are passed in decimal degrees
Returns ( phi2, lambda2, alpha21 ) as a tuple