Debian Codegraph @

geopy.egg-info/PKG-INFO

raw
1 Metadata-Version: 2.1
2 Name: geopy
3 Version: 2.4.1
4 Summary: Python Geocoding Toolbox
5 Home-page: https://github.com/geopy/geopy
6 Maintainer: Kostya Esmukov
7 Maintainer-email: [email protected]
8 License: MIT
9 Download-URL: https://github.com/geopy/geopy/archive/2.4.1.tar.gz
10 Description: geopy
11 =====
12
13 .. image:: https://img.shields.io/pypi/v/geopy.svg?style=flat-square
14 :target: https://pypi.python.org/pypi/geopy/
15 :alt: Latest Version
16
17 .. image:: https://img.shields.io/github/actions/workflow/status/geopy/geopy/ci.yml?branch=master&style=flat-square
18 :target: https://github.com/geopy/geopy/actions/workflows/ci.yml?query=branch%3Amaster
19 :alt: Build Status
20
21 .. image:: https://img.shields.io/github/license/geopy/geopy.svg?style=flat-square
22 :target: https://pypi.python.org/pypi/geopy/
23 :alt: License
24
25
26 geopy is a Python client for several popular geocoding web
27 services.
28
29 geopy makes it easy for Python developers to locate the coordinates of
30 addresses, cities, countries, and landmarks across the globe using
31 third-party geocoders and other data sources.
32
33 geopy includes geocoder classes for the `OpenStreetMap Nominatim`_,
34 `Google Geocoding API (V3)`_, and many other geocoding services.
35 The full list is available on the `Geocoders doc section`_.
36 Geocoder classes are located in `geopy.geocoders`_.
37
38 .. _OpenStreetMap Nominatim: https://nominatim.org
39 .. _Google Geocoding API (V3): https://developers.google.com/maps/documentation/geocoding/
40 .. _Geocoders doc section: https://geopy.readthedocs.io/en/latest/#geocoders
41 .. _geopy.geocoders: https://github.com/geopy/geopy/tree/master/geopy/geocoders
42
43 geopy is tested against CPython (versions 3.7, 3.8, 3.9, 3.10, 3.11, 3.12)
44 and PyPy3. geopy 1.x line also supported CPython 2.7, 3.4 and PyPy2.
45
46 © geopy contributors 2006-2018 (see AUTHORS) under the `MIT
47 License <https://github.com/geopy/geopy/blob/master/LICENSE>`__.
48
49 Installation
50 ------------
51
52 Install using `pip <http://www.pip-installer.org/en/latest/>`__ with:
53
54 ::
55
56 pip install geopy
57
58 Or, `download a wheel or source archive from
59 PyPI <https://pypi.python.org/pypi/geopy>`__.
60
61 Geocoding
62 ---------
63
64 To geolocate a query to an address and coordinates:
65
66 .. code:: pycon
67
68 >>> from geopy.geocoders import Nominatim
69 >>> geolocator = Nominatim(user_agent="specify_your_app_name_here")
70 >>> location = geolocator.geocode("175 5th Avenue NYC")
71 >>> print(location.address)
72 Flatiron Building, 175, 5th Avenue, Flatiron, New York, NYC, New York, ...
73 >>> print((location.latitude, location.longitude))
74 (40.7410861, -73.9896297241625)
75 >>> print(location.raw)
76 {'place_id': '9167009604', 'type': 'attraction', ...}
77
78 To find the address corresponding to a set of coordinates:
79
80 .. code:: pycon
81
82 >>> from geopy.geocoders import Nominatim
83 >>> geolocator = Nominatim(user_agent="specify_your_app_name_here")
84 >>> location = geolocator.reverse("52.509669, 13.376294")
85 >>> print(location.address)
86 Potsdamer Platz, Mitte, Berlin, 10117, Deutschland, European Union
87 >>> print((location.latitude, location.longitude))
88 (52.5094982, 13.3765983)
89 >>> print(location.raw)
90 {'place_id': '654513', 'osm_type': 'node', ...}
91
92 Measuring Distance
93 ------------------
94
95 Geopy can calculate geodesic distance between two points using the
96 `geodesic distance
97 <https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>`_ or the
98 `great-circle distance
99 <https://en.wikipedia.org/wiki/Great-circle_distance>`_,
100 with a default of the geodesic distance available as the function
101 `geopy.distance.distance`.
102
103 Here's an example usage of the geodesic distance, taking pair
104 of :code:`(lat, lon)` tuples:
105
106 .. code:: pycon
107
108 >>> from geopy.distance import geodesic
109 >>> newport_ri = (41.49008, -71.312796)
110 >>> cleveland_oh = (41.499498, -81.695391)
111 >>> print(geodesic(newport_ri, cleveland_oh).miles)
112 538.390445368
113
114 Using great-circle distance, also taking pair of :code:`(lat, lon)` tuples:
115
116 .. code:: pycon
117
118 >>> from geopy.distance import great_circle
119 >>> newport_ri = (41.49008, -71.312796)
120 >>> cleveland_oh = (41.499498, -81.695391)
121 >>> print(great_circle(newport_ri, cleveland_oh).miles)
122 536.997990696
123
124 Documentation
125 -------------
126
127 More documentation and examples can be found at
128 `Read the Docs <http://geopy.readthedocs.io/en/latest/>`__.
129
130 Keywords: geocode,geocoding,gis,geographical,maps,earth,distance
131 Platform: UNKNOWN
132 Classifier: Development Status :: 5 - Production/Stable
133 Classifier: Intended Audience :: Developers
134 Classifier: Intended Audience :: Science/Research
135 Classifier: License :: OSI Approved :: MIT License
136 Classifier: Operating System :: OS Independent
137 Classifier: Programming Language :: Python
138 Classifier: Topic :: Scientific/Engineering :: GIS
139 Classifier: Topic :: Software Development :: Libraries :: Python Modules
140 Classifier: Programming Language :: Python :: 3 :: Only
141 Classifier: Programming Language :: Python :: 3
142 Classifier: Programming Language :: Python :: 3.7
143 Classifier: Programming Language :: Python :: 3.8
144 Classifier: Programming Language :: Python :: 3.9
145 Classifier: Programming Language :: Python :: 3.10
146 Classifier: Programming Language :: Python :: 3.11
147 Classifier: Programming Language :: Python :: 3.12
148 Classifier: Programming Language :: Python :: Implementation :: CPython
149 Classifier: Programming Language :: Python :: Implementation :: PyPy
150 Requires-Python: >=3.7
151 Provides-Extra: dev
152 Provides-Extra: dev-lint
153 Provides-Extra: dev-test
154 Provides-Extra: dev-docs
155 Provides-Extra: aiohttp
156 Provides-Extra: requests
157 Provides-Extra: timezone