Skip to content

Commit 02e3044

Browse files
committed
Update documentation
- Added Mapquest, Maxmind, OpenCage, OpenStreetMap
1 parent 82a11a5 commit 02e3044

File tree

11 files changed

+241
-252
lines changed

11 files changed

+241
-252
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
geocoder/__pycache__/
13
.coverage
24
MANIFEST
35
coverage.xml
@@ -14,11 +16,12 @@ geocoder.egg-info/
1416
*.pyc
1517
*.swp
1618
*.egg
19+
*.pyo
1720
env/
1821

1922
.workon
2023

2124
t.py
2225

2326
t2.py
24-
dist
27+
dist

docs/index.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,13 @@ Detailed information about each individual provider that are within Geocoder.
6868
providers/ArcGIS.rst
6969
providers/Baidu.rst
7070
providers/Bing.rst
71+
providers/CanadaPost.rst
7172
providers/Google.rst
7273
providers/Mapbox.rst
73-
providers/CanadaPost.rst
74+
providers/MapQuest.rst
75+
providers/MaxMind.rst
76+
providers/OpenCage.rst
77+
providers/OpenStreetMap.rst
7478
providers/FreeGeoIP.rst
7579
providers/Geocoder-ca.rst
7680
providers/GeoOttawa.rst

docs/providers/IPInfo.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
IP Info.io (IP Address)
2-
=======================
1+
IP Info.io
2+
==========
33

4-
Use the ipinfo.io IP lookup API to quickly and simply integrate IP geolocation
4+
Use the IPInfo.io IP lookup API to quickly and simply integrate IP geolocation
55
into your script or website. Save yourself the hassle of setting up local GeoIP
66
libraries and having to remember to regularly update the data.
77

docs/providers/MapQuest.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

docs/providers/MapQuest.rst

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
MapQuest
2+
========
3+
4+
The geocoding service enables you to take an address and get the
5+
associated latitude and longitude. You can also use any latitude
6+
and longitude pair and get the associated address. Three types of
7+
geocoding are offered: address, reverse, and batch.
8+
Using Geocoder you can retrieve MapQuest's geocoded data from Geocoding Service.
9+
10+
Examples
11+
~~~~~~~~
12+
13+
Basic Geocoding
14+
---------------
15+
16+
.. code-block:: python
17+
18+
>>> import geocoder
19+
>>> g = geocoder.mapquest('San Francisco, CA')
20+
>>> g.json
21+
...
22+
23+
Command Line Interface
24+
----------------------
25+
26+
.. code-block:: bash
27+
28+
$ geocode 'San Francisco, CA' --provider mapquest --out geojson
29+
30+
Parameters
31+
----------
32+
33+
- `location`: Your search location you want geocoded.
34+
- `method`: (default=geocode) Use the following:
35+
- geocode
36+
37+
References
38+
----------
39+
40+
- `Mapquest Geocoding Service <http://www.mapquestapi.com/geocoding/>`_
41+

docs/providers/MaxMind.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

docs/providers/MaxMind.rst

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
MaxMind
2+
=======
3+
4+
MaxMind's GeoIP2 products enable you to identify the location,
5+
organization, connection speed, and user type of your Internet
6+
visitors. The GeoIP2 databases are among the most popular and
7+
accurate IP geolocation databases available.
8+
Using Geocoder you can retrieve Maxmind's geocoded data from MaxMind's GeoIP2.
9+
10+
Examples
11+
~~~~~~~~
12+
13+
Basic Geocoding
14+
---------------
15+
16+
.. code-block:: python
17+
18+
>>> import geocoder
19+
>>> g = geocoder.maxmind('199.7.157.0')
20+
>>> g.latlng
21+
[45.413140, -75.656703]
22+
>>> g.city
23+
'Toronto'
24+
>>> g.json
25+
...
26+
27+
Lookup your own IP
28+
------------------
29+
30+
To retrieve your own IP address, simply have `''` or `'me'` as the input.
31+
32+
.. code-block:: python
33+
34+
>>> import geocoder
35+
>>> g = geocoder.maxmind('')
36+
>>> g.latlng
37+
[45.413140, -75.656703]
38+
>>> g.ip
39+
'199.7.157.0'
40+
>>> g.json
41+
...
42+
43+
44+
Command Line Interface
45+
----------------------
46+
47+
.. code-block:: bash
48+
49+
$ geocode '8.8.8.8' --provider maxmind | jq .
50+
51+
Parameters
52+
~~~~~~~~~~
53+
54+
- `location`: Your search IP Address you want geocoded.
55+
- `location`: (optional) `'me'` will return your current IP address's location.
56+
- `method`: (default=geocode) Use the following:
57+
- geocode
58+
59+
References
60+
~~~~~~~~~~
61+
62+
- `MaxMind's GeoIP2 <https://www.maxmind.com/en/geolocation_landing>`_

docs/providers/OpenCage.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/providers/OpenCage.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Opencage
2+
========
3+
4+
OpenCage Geocoder simple, easy, and open geocoding for the entire world
5+
Our API combines multiple geocoding systems in the background.
6+
Each is optimized for different parts of the world and types of requests.We aggregate the best results from open data sources and algorithms so you don't have to.
7+
Each is optimized for different parts of the world and types of requests.
8+
Using Geocoder you can retrieve OpenCage's geocoded data from OpenCage Geocoding Services.
9+
10+
Examples
11+
~~~~~~~~
12+
13+
Basic Geocoding
14+
---------------
15+
16+
.. code-block:: python
17+
18+
>>> import geocoder
19+
>>> g = geocoder.opencage('San Francisco, CA')
20+
>>> g.json
21+
...
22+
23+
Command Line Interface
24+
----------------------
25+
26+
.. code-block:: bash
27+
28+
$ geocode 'San Francisco, CA' --provider opencage --out geojson | jq .
29+
30+
Parameters
31+
----------
32+
33+
- `location`: Your search location you want geocoded.
34+
- `key`: (optional) use your own API Key from OpenCage.
35+
- `method`: (default=geocode) Use the following:
36+
- geocode
37+
38+
References
39+
----------
40+
41+
- `OpenCage Geocoding Services <http://geocoder.opencagedata.com/api.html>`_
42+

0 commit comments

Comments
 (0)