-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost-geocode.sql
178 lines (148 loc) · 4.6 KB
/
post-geocode.sql
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
SET client_encoding TO 'UTF8';
UPDATE sightings SET point = ST_Transform(ST_SetSRID(ST_MakePoint(longitude, latitude), 4326), 3857);
DROP INDEX IF EXISTS spatial_index_point;
CREATE INDEX spatial_index_point ON sightings USING gist (point);
-- Updates to bad locations
UPDATE sightings
SET location_text = REPLACE(location_text, '1640 Moss v/Spareland', '1640 Spareland, Moss, Viken')
WHERE location_text = '1640 Moss v/Spareland';
UPDATE sightings
SET location_text = REPLACE(location_text, 'Spareland vMoss', '1640 Spareland, Moss, Viken')
WHERE location_text = 'Spareland vMoss';
UPDATE sightings
SET location_text = REPLACE(location_text, '2 km. nord for Bodø.', 'Bodø, Nordland')
WHERE location_text LIKE '2 km. nord for Bod%';
UPDATE sightings
SET location_text = REPLACE(location_text, '6500 Kristaiansund N.', '6500 Kristaiansund N')
WHERE location_text = '6500 Kristaiansund N.';
-- UPDATE sightings
-- SET location_text = REPLACE(location_text, 'Lyngeidet', 'Lyngseidet')
-- WHERE location_text LIKE '%Lyngeidet%';
UPDATE sightings
SET location_text = REPLACE(location_text, 'Alhusstrand', 'Ålhussand')
WHERE location_text = 'Alhusstrand';
UPDATE sightings
SET location_text = REPLACE(location_text, 'Bakke i Oklungen', 'Oklungen')
WHERE location_text = 'Bakke i Oklungen';
UPDATE sightings
SET location_text = 'Brumunddal'
WHERE location_text = 'Brummunddal' OR location_text = 'Brumundal';
UPDATE sightings
SET location_text = 'Eidsvågsneset'
WHERE location_text = 'Eidsvågnesset';
UPDATE sightings
SET location_text = REPLACE(location_text, 'Fetsundbrua', 'Fetsund, Lillestrøm, Viken')
WHERE location_text = 'Fetsundbrua';
UPDATE sightings
SET location_text = REPLACE(location_text, 'Fjørangen', 'Fjøsanger')
WHERE location_text = 'Fjørangen';
UPDATE sightings
SET location_text = 'Gimsøyfjorden, Lofoten, Nordland'
WHERE location_text = 'Gimsøyfjorden';
UPDATE sightings
SET location_text = REPLACE(location_text, 'Spania', 'Spain')
WHERE location_text = 'Spania';
UPDATE sightings
SET location_text = '3047 Drammen, Gulskagen'
WHERE location_text = 'Gulskagen';
UPDATE sightings
SET location_text = '3533 Tyristrand, Hagabru'
WHERE location_text = 'Hagabru';
UPDATE sightings
SET location_text = '2080 Hammerstad, Hammerstadkrysset'
WHERE location_text = 'Hammerstadkrysset';
UPDATE sightings
SET location_text = '2750 Gran, Hellevn, Minde'
WHERE location_text = 'Hellevn, Minde';
UPDATE sightings
SET location_text = '3560 Hemsedal, Henningvann'
WHERE location_text = 'Henningvann';
UPDATE sightings
SET location_text = '3560 Hemsedal, Hinningvatn'
WHERE location_text = 'Hinningvatn';
UPDATE sightings
SET location_text = '5259 Hjelestad'
WHERE location_text = 'Hjelestadskiftet';
UPDATE sightings
SET location_text = 'Hoemsetra, Eikesdal, Møre og Romsdal'
WHERE location_text = 'Hoemsetra, Eikesdal';
UPDATE sightings
SET location_text = '8664 Holandsvik, Røst, Nordland'
WHERE location_text = 'Holandsvik';
-- "Grand Canaria Playa del I"
-- "Grensevn. - Økervn." - maybe "Grenseveien" and "Økernveien" but where?
-- "Grensevn." - maybe Grenseveien but where?
-- "Gressbakken"
-- "Gressviksletta" - Gressvik sletta?
-- "Haltug"
-- "Hammerstadkrysset"
-- "Haraldsvei" -- which one?
-- "Hellevn, Minde"
-- "Henningvann"
-- "Hetleviksåsen"
-- "Hinningvatn"
-- "Hjelestadskiftet"
-- "Hoemsetra, Eikesdal"
-- "Holandsvik"
-- "Hormindal"
-- "Ivedalsvann"
-- "Jægervannet"
-- "Jarer"
-- "Kågsund, Skjervøy"
-- "Købehavngata, Oslo 5"
-- "kollåsen, Ulset i Åsane"
-- "Kronåsen"
-- "Lambertsetervn."
-- "Leikvikfjell"
-- "Lilleakervn."
-- "Lønninghavn"
-- "Lutvatn"
-- "Mossevn. ved Gjersjøen"
-- "Nebb ved Skøyen"
-- "Nemabu Høyfjellstue"
-- "Nordgrenseter"
-- "Nøsenvannet"
-- "Onsog"
-- "Portugalkysten"
-- "Resdalsseter."
-- "Romsdalsfjorden"
-- "ROTA ved Malviklandet"
-- "Røverdalen"
-- "Rudeløkka, Oslo"
-- "Saksehaug"
-- "Sandøysund"
-- "Sandviksbroen, Drammensvn"
-- "Selvbyggervn. Oslo 5"
-- "Sendsjøen"
-- "Setskogen"
-- "Skjetnemarka"
-- "Skøyenmoen, Ilseng"
-- "Skråfjord"
-- "Sofiesgt."
-- "Solborgvannet"
-- "Søtefjell"
-- "Sousse"
-- "Stemalen, Tønsberg"
-- "Stenb.Haugen"
-- "Sundalen"
-- "Tisvattnet"
-- "Tollbodgt. Kr.sand"
-- "Valnes i Salten"
-- "Veitvedt"
-- "Vesleheim Ranheim"
-- "Waatvik"
-- Places not geocoded that I can't fix:
-- Alvekleiva
-- Angeltrøa
-- Aresvik
-- Bjøringvann - which one
-- Borgenhøy, Holter
-- Borgenhøy
-- Davangen - maybe Davangsvågen?
-- Dypådalen seter
-- Eggevammen, Steinkjer (Trøndelag) exists but not in the geocode db
-- Eikebygda
-- Fagernesbroen = Fagernes?
-- Fantofthøyden
-- Fløyrestauranten - the Fløy restaurant where?
-- Fonåsfjellet - which one?