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.
class cerbere.geo.bathymetry.Bathymetry(resolution='', filename=None, cache=False)[source]

A class to handle bathymetry information and distance to coast.

get_depth(lon, lat)[source]

Return the depth, in meters

get_distance_to_shore(lon, lat)[source]

Return the distance to the coast, in meters

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’ (

code for ellipsoid posted to GMT mailing list by Jim Leven in Dec 1999

Contact: Jeff Whitaker <>

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

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

landmask Module

point Module

Created on 29 mars 2012

@author: jfpiolle

class cerbere.geo.point.Point(lon, lat)[source]

Bases: object



classmethod get_distance(point1, point2)[source]

return the distance in meters between two points

classmethod get_distance_latlon(lats, lons, lat, lon)[source]

spatialshape Module

tile Module