@@ -62,19 +62,7 @@ Compile the package in current directory: `python setup.py --inplace`
6262Install in your Python environment using: ` python setup.py install `
6363
6464
65- ## Usage in Python
66-
67- ``` python
68- import mapcode
69- ```
70- dir (mapcode)
71-
72- e.g.:
73-
74- import mapcode
75- dir(mapcode)
76- [ '__ doc__ ', '__ file__ ', '__ name__ ', '__ package__ ', 'decode', 'encode', 'encode_single', 'isvalid', 'version']
77- ```
65+ # Usage in Python
7866
7967## Mapcode syntax validation
8068
@@ -103,9 +91,10 @@ False
10391```
10492
10593
106- ## Enconding latitude, longitude to a mapcode
94+ ## Encoding
10795
108- For encoding there are two methods avaiable.
96+ For encoding latitude, longitude to a mapcode there are two methods avaiable:
97+ encode_single() and encode().
10998
11099Use the encode_single() method to find one possible mapcode. Optionally
111100a territory code can be provide to encode for just that territory.
@@ -138,9 +127,10 @@ A territory code can be provide to encode for just that territory.
138127``` python
139128print mapcode.encode(52.376514 , 4.908542 , ' NLD' )
140129print mapcode.encode(39.609999 ,45.949999 , ' AZE' )
141- [[' XLT.HWB' , ' AZE' ], [' 2Z.05XL' , ' AZE' ], [' 6N49.HHV' , ' AZE' ]]```
130+ [[' XLT.HWB' , ' AZE' ], [' 2Z.05XL' , ' AZE' ], [' 6N49.HHV' , ' AZE' ]]
131+ ```
142132
143- # # Decoding mapcode to latitude, longitude
133+ ## Decoding
144134
145135Use the decode() method to decode a mapcode back to latitude and longitude.
146136
@@ -164,7 +154,7 @@ print mapcode.decode('D6.58','RU-IN DK.CN0')
164154(43.259275 , 44.77198 )
165155```
166156
167- A territory is require to give context:
157+ A territory is require to give context to decoding :
168158
169159``` python
170160print mapcode.decode(' IN VY.HV' ,' USA' )
0 commit comments