You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-6
Original file line number
Diff line number
Diff line change
@@ -59,18 +59,22 @@ The CLI currently supports these geocoders:
59
59
-`bing`
60
60
-`googlev3`
61
61
-`mapquest` (and `open-mapquest`)
62
-
-`nominatim`
63
62
-`mapbox`
63
+
-`nominatim`
64
64
-`opencage`
65
65
66
-
More will be added soon.
66
+
#### Adding new geocoders
67
+
68
+
1. Open an issue with the name of the geocoding service as the ticket title ([example](https://github.com/eyeseast/geocode-sqlite/issues/35)). Put any noteworthy implementation details in the ticket body, like where to get an API key if one is required.
69
+
2. Fork the repo and add a geocoder.
70
+
3. Add an example to the `Makefile`. Add tests if there's new shared functionality.
67
71
68
72
### Common arguments and options
69
73
70
74
Each geocoder needs to know where to find the data it's working with. These are the first two arguments:
71
75
72
-
- database: a path to a SQLite file, which must already exist
73
-
- table: the name of a table, in that database, which exists and has data to geocode
76
+
-`database`: a path to a SQLite file, which must already exist
77
+
-`table`: the name of a table, in that database, which exists and has data to geocode
74
78
75
79
From there, we have a set of options passed to every geocoder:
76
80
@@ -131,9 +135,8 @@ To run the tests:
131
135
132
136
```sh
133
137
pytest
134
-
135
138
```
136
139
137
-
Please remember that this library is mainly glue code between other well-tested projects, specifically: click, geopy and sqlite-utils. Tests should focus on making sure those parts fit together correctly. We can assume the parts themselves already work.
140
+
Please remember that this library is mainly glue code between other well-tested projects, specifically: [click](https://click.palletsprojects.com/), [geopy](https://geopy.readthedocs.io/en/stable/) and [sqlite-utils](https://sqlite-utils.datasette.io/en/stable/). Tests should focus on making sure those parts fit together correctly. We can assume the parts themselves already work.
138
141
139
142
To that end, there is a test geocoder included: `geocode_sqlite.testing.DummyGeocoder`. That geocoder works with an included dataset of In-N-Out Burger locations provided by [AllThePlaces](https://www.alltheplaces.xyz/). It works like a normal GeoPy geocoder, except it will only return results for In-N-Out locations using the included database.
0 commit comments