-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
65 lines (55 loc) · 1.62 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# make a test database, and run tests
tests/%.db: tests/innout.geojson tests/innout.csv
geojson-to-sqlite $@ innout_geo tests/innout.geojson
sqlite-utils insert $@ innout_test tests/innout.csv --csv --pk id
.PHONY: test
test: tests/test.db
geocode-sqlite test tests/test.db innout_test -p tests/test.db -l "{id}" -d .1 --spatialite
.PHONY: nominatim
nominatim: tests/nominatim.db
geocode-sqlite nominatim $^ innout_test \
--location "{full}, {city}, {state} {postcode}" \
--delay 1 \
--raw \
--user-agent "geocode-sqlite"
.PHONY: mapquest
mapquest: tests/mapquest.db
geocode-sqlite open-mapquest $^ innout_test \
--location "{full}, {city}, {state} {postcode}" \
--raw \
--api-key "$(MAPQUEST_API_KEY)"
.PHONY: google
google: tests/google.db
geocode-sqlite googlev3 $^ innout_test \
--location "{full}, {city}, {state} {postcode}" \
--raw \
--delay 0 \
--api-key "$(GOOGLE_API_KEY)" \
--bbox 33.030551 -119.787326 34.695341 -115.832248
.PHONY: bing
bing: tests/bing.db
geocode-sqlite bing $^ innout_test \
--location "{full}, {city}, {state} {postcode}" \
--delay 1 \
--raw \
--api-key "$(BING_API_KEY)"
.PHONY: mapbox
mapbox: tests/mapbox.db
geocode-sqlite mapbox $^ innout_test \
--location "{full}, {city}, {state} {postcode}" \
--delay 1 \
--raw \
--api-key "$(MAPBOX_API_KEY)"
.PHONY: opencage
opencage: tests/opencage.db
geocode-sqlite opencage $^ innout_test \
--location "{full}, {city}, {state} {postcode}" \
--delay '0.1' \
--raw \
--api-key "$(OPENCAGE_API_KEY)"
.PHONY: run
run:
datasette serve tests/*.db --load-extension spatialite
.PHONY: clean
clean:
rm -f tests/test.db