Skip to content

Commit 415cec9

Browse files
authored
Merge pull request #19 from 1-Byte/nominatim
Rename geocoder to Nominatim
2 parents e68e651 + e7c95a7 commit 415cec9

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Diff for: Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ tests/%.db: tests/innout.geojson tests/innout.csv
88
test: tests/test.db
99
geocode-sqlite test tests/test.db innout_test -p tests/test.db -l "{id}" -d .1
1010

11-
.PHONY: nominatum
12-
nominatum: tests/nominatum.db
13-
geocode-sqlite nominatum $^ innout_test \
11+
.PHONY: nominatim
12+
nominatim: tests/nominatim.db
13+
geocode-sqlite nominatim $^ innout_test \
1414
--location "{full}, {city}, {state} {postcode}" \
1515
--delay 1 \
1616
--user-agent "geocode-sqlite"

Diff for: README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ First, create a SQLite database and insert rows from that spreadsheet using `sql
2828
sqlite-utils insert data.db data data.csv --csv
2929
```
3030

31-
Now, geocode it using OpenStreetMap's Nominatum geocoder.
31+
Now, geocode it using OpenStreetMap's Nominatim geocoder.
3232

3333
```sh
34-
geocode-sqlite nominatum data.db data \
34+
geocode-sqlite nominatim data.db data \
3535
--location="{address}, {city}, {state} {zip}" \
3636
--delay=1 \
3737
--user-agent="this-is-me"
3838
```
3939

40-
In the command above, you're using Nominatum, which is free and only asks for a unique user agent (`--user-agent`).
40+
In the command above, you're using Nominatim, which is free and only asks for a unique user agent (`--user-agent`).
4141

4242
This will connect to a database (`data.db`) and read all rows from the table `data` (skipping any that already
4343
have both a `latitude` and `longitude` column filled).
@@ -57,7 +57,7 @@ The CLI currently supports these geocoders:
5757
- `bing`
5858
- `googlev3`
5959
- `mapquest` (and `open-mapquest`)
60-
- `nominatum`
60+
- `nominatim`
6161

6262
More will be added soon.
6363

@@ -85,10 +85,10 @@ As with the CLI, this assumes you already have a SQLite database and a table of
8585

8686
```python
8787
from geocode_sqlite import geocode_table
88-
from geopy.geocoders import Nominatum
88+
from geopy.geocoders import Nominatim
8989

9090
# create a geocoder instance, with some extra options
91-
nominatum = Nominatum(user_agent="this-is-me", domain="nominatum.local.dev", scheme="http")
91+
nominatim = Nominatim(user_agent="this-is-me", domain="nominatim.local.dev", scheme="http")
9292

9393
# assuming our database is in the same directory
9494
count = geocode_table("data.db", "data", query_template="{address}, {city}, {state} {zip}")

Diff for: geocode_sqlite/cli.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ def mapquest(ctx, database, table, location, delay, latitude, longitude, api_key
260260
show_default=True,
261261
)
262262
@common_options
263-
def nominatum(
263+
def nominatim(
264264
ctx, database, table, location, delay, latitude, longitude, user_agent, domain
265265
):
266-
"Nominatum (OSM)"
267-
click.echo(f"Using Nominatum geocoder at {domain}")
266+
"Nominatim (OSM)"
267+
click.echo(f"Using Nominatim geocoder at {domain}")
268268
fill_context(ctx, database, table, location, delay, latitude, longitude)
269269
return geocoders.Nominatim(user_agent=user_agent, domain=domain)
270270

0 commit comments

Comments
 (0)