Skip to content

Commit 2f8c6ef

Browse files
committed
Readme changes.
1 parent 91f08cc commit 2f8c6ef

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

README.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,7 @@ Compile the package in current directory: `python setup.py --inplace`
6262
Install 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

11099
Use the encode_single() method to find one possible mapcode. Optionally
111100
a 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
139128
print mapcode.encode(52.376514, 4.908542, 'NLD')
140129
print 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

145135
Use 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
170160
print mapcode.decode('IN VY.HV','USA')

0 commit comments

Comments
 (0)