Bases: object
Bases: d_rats.geopy.distance.Distance
Calculate and set the distance between self.a and self.b, which should be two geodesic points. Since there are multiple formulas to calculate this, implementation is left up to the subclass.
Bases: d_rats.geopy.distance.GeodesicDistance
Use spherical geometry to calculate the surface distance between two geodesic points. This formula can be written many different ways, including just the use of the spherical law of cosines or the haversine formula.
The class member RADIUS indicates which radius of the earth to use, in kilometers. The default is to use the module constant EARTH_RADIUS, which uses the average great-circle radius.
Bases: d_rats.geopy.distance.GeodesicDistance
Calculate the geodesic distance between two points using the formula devised by Thaddeus Vincenty, with an accurate ellipsoidal model of the earth.
The class attribute ELLIPSOID indicates which ellipsoidal model of the earth to use. If it 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. The most globally accurate model is WGS-84. See the comments above the ELLIPSOIDS dictionary for more information.
Calculate the decimal equivalent of the sum of arcminutes and arcseconds in degrees.
alias of VincentyDistance
Bases: d_rats.geopy.geocoders.WebGeocoder
Do the WikiMedia dance: replace spaces with underscores.
Bases: d_rats.geopy.geocoders.MediaWiki
Parse the URL of the RDF link from the <head> of page.
Normalize semantic attribute and relation names by replacing spaces with underscores and capitalizing the result.
Bases: d_rats.geopy.geocoders.WebGeocoder
Geocoder using the Google Maps API.
This parses JavaScript returned by queries the actual Google Maps interface and could thus break easily. However, this is desirable if the HTTP geocoder doesn’t work for addresses in your country (the UK, for example).
Parse a location name, latitude, and longitude from an XML response.
Bases: d_rats.geopy.geocoders.WebGeocoder
Geocoder using the Yahoo! Maps API.
Note: The Terms of Use dictate that the stand-alone geocoder may only be used for displaying Yahoo! Maps or points on Yahoo! Maps. Lame.
See the Yahoo! Maps API Terms of Use for more information: http://developer.yahoo.com/maps/mapsTerms.html
Parse a location name, latitude, and longitude from an XML response.
Bases: d_rats.geopy.geocoders.WebGeocoder
Geocoder using the United States-only geocoder.us API at http://geocoder.us. This geocoder is free for non-commercial purposes, otherwise you must register and pay per call. This class supports both free and commercial API usage.
Parse a location name, latitude, and longitude from an RDF response.
Bases: d_rats.geopy.geocoders.WebGeocoder
Geocoder using Microsoft’s Windows Live Local web service, powered by Virtual Earth.
WARNING: This does not use a published API and can easily break if Microsoft changes their JavaScript.
Return a 2-tuple of Decimals parsed from string. The default regular expression can parse most common coordinate formats, including:
41.5;-81.0 41.5,-81.0 41.5 -81.0 41.5 N -81.0 W -41.5 S;81.0 E 23 26m 22s N 23 27m 30s E 23 26’ 22” N 23 27’ 30” E
...and more whitespace and separator variations. UTF-8 characters such as the degree symbol, prime (arcminutes), and double prime (arcseconds) are also supported. Coordinates given from South and West will be converted appropriately (by switching their signs).
A custom expression can be given using the regex argument. It can be a string or compiled regular expression, and must contain groups named ‘latitude_degrees’ and ‘longitude_degrees’. It can optionally contain groups named ‘latitude_minutes’, ‘latitude_seconds’, ‘longitude_minutes’, ‘longitude_seconds’ for increased precision. Optional single-character groups named ‘north_south’ and ‘east_west’ may be included to indicate direction, it is assumed that the coordinates reference North and East otherwise.