1

Work on scraper

This commit is contained in:
Alex Yatskov 2015-08-14 10:10:49 +09:00
parent 08bd475950
commit c92823220b
4 changed files with 3892 additions and 56 deletions

843
cache/geocache.json vendored
View File

@ -1 +1,842 @@
{"1-1-3 Sagamihara Chuo-ku Sagamihara Kanagawa":{"Latitude":35.5811327,"Longitude":139.3709098},"1-6-1 Kamiookanishi Konan-ku Yokohama Kanagawa":{"Latitude":35.4072739,"Longitude":139.5961112},"16-1 Totsukacho Totsuka-ku Yokohama Kanagawa":{"Latitude":35.4015872,"Longitude":139.5332269},"2-14-1 Minamisaiwai Nishi-ku Yokohama Kanagawa":{"Latitude":35.4640304,"Longitude":139.6177293},"200 Yamashitacho Naka-ku Yokohama Kanagawa":{"Latitude":35.4431273,"Longitude":139.6434308},"3-43-4 Wakabacho Naka-ku Yokohama Kanagawa":{"Latitude":35.4412748,"Longitude":139.6275875},"4-14-25 Chuorinkan Yamato Kanagawa":{"Latitude":35.5080078,"Longitude":139.4455886},"4-2-1 Kamikodanaka Nakahara-ku Kawasaki Kanagawa":{"Latitude":35.5813758,"Longitude":139.6409824},"61-1 Yamashitacho Naka-ku Yokohama Kanagawa":{"Latitude":35.4438856,"Longitude":139.6488554},"Takashima Nishi-ku Yokohama Kanagawa":{"Latitude":35.4622889,"Longitude":139.6222899}} {
"1 Nisshincho Kawasaki-ku Kawasaki Kanagawa": {
"Latitude": 35.5287061,
"Longitude": 139.6954574
},
"1-1 Izumicho Atsugi Kanagawa": {
"Latitude": 35.4393657,
"Longitude": 139.3643026
},
"1-1 Motomachi Chigasaki Kanagawa": {
"Latitude": 35.3304767,
"Longitude": 139.4060859
},
"1-1-1 Arima Miyamae-ku Kawasaki Kanagawa": {
"Latitude": 35.5782487,
"Longitude": 139.5757285
},
"1-1-1 Hironodai Zama Kanagawa": {
"Latitude": 35.5069534,
"Longitude": 139.4126971
},
"1-1-13 Kitasaiwai Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4674661,
"Longitude": 139.6211927
},
"1-1-15 Kugenumatachibana Fujisawa Kanagawa": {
"Latitude": 35.3364539,
"Longitude": 139.486003
},
"1-1-2 Kitasaiwai Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.46764940000001,
"Longitude": 139.6222259
},
"1-1-2 Shinko Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4526178,
"Longitude": 139.6428859
},
"1-1-3 Mizonokuchi Takatsu-ku Kawasaki Kanagawa": {
"Latitude": 35.5988984,
"Longitude": 139.6116289
},
"1-1-3 Sagamihara Chuo-ku Sagamihara Kanagawa": {
"Latitude": 35.5811327,
"Longitude": 139.3709098
},
"1-1-67 Sakuragicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4497142,
"Longitude": 139.6310632
},
"1-1-7 Sakuragicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4497142,
"Longitude": 139.6310632
},
"1-1-9 Sakaecho Odawara Kanagawa": {
"Latitude": 35.25584,
"Longitude": 139.1555818
},
"1-10 Kinkocho Kanagawa-ku Yokohama Kanagawa": {
"Latitude": 35.4665051,
"Longitude": 139.6266506
},
"1-10-13 Miyamaedaira Miyamae-ku Kawasaki Kanagawa": {
"Latitude": 35.5847505,
"Longitude": 139.5823942
},
"1-10-13 Utsukushigaoka Aoba-ku Yokohama Kanagawa": {
"Latitude": 35.5787848,
"Longitude": 139.5557608
},
"1-10-7 Ofuna Kamakura Kanagawa": {
"Latitude": 35.3525854,
"Longitude": 139.532088
},
"1-11 Nisshincho Kawasaki-ku Kawasaki Kanagawa": {
"Latitude": 35.5294171,
"Longitude": 139.6967267
},
"1-11-23 Ofuna Kamakura Kanagawa": {
"Latitude": 35.3521521,
"Longitude": 139.5317658
},
"1-12-14 Mizonokuchi Takatsu-ku Kawasaki Kanagawa": {
"Latitude": 35.6003954,
"Longitude": 139.6131064
},
"1-12-18 Mizonokuchi Takatsu-ku Kawasaki Kanagawa": {
"Latitude": 35.6003537,
"Longitude": 139.6134064
},
"1-13-1 Mizonokuchi Takatsu-ku Kawasaki Kanagawa": {
"Latitude": 35.5998899,
"Longitude": 139.6131675
},
"1-13-17 Miyagawacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4463686,
"Longitude": 139.6294372
},
"1-14-13 Shonandai Fujisawa Kanagawa": {
"Latitude": 35.39519050000001,
"Longitude": 139.4678736
},
"1-14-3 Kamiookanishi Konan-ku Yokohama Kanagawa": {
"Latitude": 35.4101398,
"Longitude": 139.5958578
},
"1-14-55 Sakaecho Odawara Kanagawa": {
"Latitude": 35.2544041,
"Longitude": 139.1577761
},
"1-14-8 Kamiookanishi Konan-ku Yokohama Kanagawa": {
"Latitude": 35.4097148,
"Longitude": 139.5958217
},
"1-16-3 Okano Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4635499,
"Longitude": 139.6145964
},
"1-17-1 Manpukuji Asao-ku Kawasaki Kanagawa": {
"Latitude": 35.604455,
"Longitude": 139.5075771
},
"1-19-17 Hiyoshihoncho Kohoku-ku Yokohama Kanagawa": {
"Latitude": 35.5534141,
"Longitude": 139.6453667
},
"1-2 Yonegahamadori Yokosuka Kanagawa": {
"Latitude": 35.2777858,
"Longitude": 139.6747862
},
"1-2-18 Shichirigahamahigashi Kamakura Kanagawa": {
"Latitude": 35.3065761,
"Longitude": 139.5151948
},
"1-2-2 Hisamoto Takatsu-ku Kawasaki Kanagawa": {
"Latitude": 35.598729,
"Longitude": 139.6094986
},
"1-2-8 Sakaecho Odawara Kanagawa": {
"Latitude": 35.2551429,
"Longitude": 139.1570178
},
"1-2-9 Hakusan Midori-ku Yokohama Kanagawa": {
"Latitude": 35.5094769,
"Longitude": 139.562337
},
"1-2-9 Tsunashimanishi Kohoku-ku Yokohama Kanagawa": {
"Latitude": 35.5379502,
"Longitude": 139.6354986
},
"1-20-1 Kamiasao Asao-ku Kawasaki Kanagawa": {
"Latitude": 35.6037968,
"Longitude": 139.5080938
},
"1-24-1 Ishikawacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4379668,
"Longitude": 139.6450699
},
"1-24-16 Asahicho Atsugi Kanagawa": {
"Latitude": 35.4379825,
"Longitude": 139.3641915
},
"1-25-1 Nakagawachuo Tsuzuki-ku Yokohama Kanagawa": {
"Latitude": 35.5516442,
"Longitude": 139.579457
},
"1-26-3 Motomachi Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4408026,
"Longitude": 139.64975
},
"1-3-3 Kugenumaishigami Fujisawa Kanagawa": {
"Latitude": 35.3370123,
"Longitude": 139.4885694
},
"1-3-43 Nishisakawa Odawara Kanagawa": {
"Latitude": 35.2649924,
"Longitude": 139.1830447
},
"1-3-7 Isago Kawasaki-ku Kawasaki Kanagawa": {
"Latitude": 35.5320001,
"Longitude": 139.7005735
},
"1-3-9 Hiranuma Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4602114,
"Longitude": 139.620718
},
"1-31-2 Tsurumichuo Tsurumi-ku Yokohama Kanagawa": {
"Latitude": 35.5070567,
"Longitude": 139.6767847
},
"1-36 Hanasakicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4493321,
"Longitude": 139.6306231
},
"1-36 Hinodecho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4450021,
"Longitude": 139.6266763
},
"1-39-7 Nakagawachuo Tsuzuki-ku Yokohama Kanagawa": {
"Latitude": 35.5552299,
"Longitude": 139.5816873
},
"1-4-1 Chuo Ebina Kanagawa": {
"Latitude": 35.4519951,
"Longitude": 139.3935612
},
"1-4-1 Kitasaiwai Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4672994,
"Longitude": 139.6195734
},
"1-4-1 Mizonokuchi Takatsu-ku Kawasaki Kanagawa": {
"Latitude": 35.5992261,
"Longitude": 139.612826
},
"1-4-25 Hiyoshihoncho Kohoku-ku Yokohama Kanagawa": {
"Latitude": 35.5542361,
"Longitude": 139.6452889
},
"1-4-7 Isezakicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4443883,
"Longitude": 139.6329981
},
"1-4-7 Nakagawachuo Tsuzuki-ku Yokohama Kanagawa": {
"Latitude": 35.5525996,
"Longitude": 139.5761212
},
"1-5-9 Shimokodanaka Nakahara-ku Kawasaki Kanagawa": {
"Latitude": 35.5810148,
"Longitude": 139.639652
},
"1-6-1 Kamiookanishi Konan-ku Yokohama Kanagawa": {
"Latitude": 35.4072739,
"Longitude": 139.5961112
},
"1-6-17 Hinominami Konan-ku Yokohama Kanagawa": {
"Latitude": 35.380857,
"Longitude": 139.5778179
},
"1-6-21 Enoshima Fujisawa Kanagawa": {
"Latitude": 35.3001708,
"Longitude": 139.4820311
},
"1-6-3 Kamiasao Asao-ku Kawasaki Kanagawa": {
"Latitude": 35.6019444,
"Longitude": 139.5097021
},
"1-6-31 Minamisaiwai Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4657774,
"Longitude": 139.6205984
},
"1-6-5 Isezakicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4440522,
"Longitude": 139.6326148
},
"1-7 Honcho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.447549,
"Longitude": 139.6408697
},
"1-7-11 Nakamachidai Tsuzuki-ku Yokohama Kanagawa": {
"Latitude": 35.5356301,
"Longitude": 139.589776
},
"1-7-11 Sakaecho Atsugi Kanagawa": {
"Latitude": 35.441232,
"Longitude": 139.3579671
},
"1-7-12 Minamirinkan Yamato Kanagawa": {
"Latitude": 35.4951939,
"Longitude": 139.4474501
},
"1-8-1 Chuo Ebina Kanagawa": {
"Latitude": 35.4536087,
"Longitude": 139.3926584
},
"1-8-36 Yukinoshita Kamakura Kanagawa": {
"Latitude": 35.3232639,
"Longitude": 139.5543002
},
"1-9 Yoshihamacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.43996380000001,
"Longitude": 139.642231
},
"1-9-15 Kamiookahigashi Konan-ku Yokohama Kanagawa": {
"Latitude": 35.4100343,
"Longitude": 139.5972576
},
"10-8 Mitsuzawa Nakamachi Kanagawa-ku Yokohama Kanagawa": {
"Latitude": 35.4766983,
"Longitude": 139.6087108
},
"12-1 Honmokuhara Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4254491,
"Longitude": 139.6650934
},
"12-1 Nishicho Isogo-ku Yokohama Kanagawa": {
"Latitude": 35.4164533,
"Longitude": 139.6336678
},
"1297 Ninotaira Hakone Ashigarashimo-gun Kanagawa": {
"Latitude": 35.2416651,
"Longitude": 139.0432767
},
"138 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4425774,
"Longitude": 139.6458973
},
"144 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4430134,
"Longitude": 139.6446946
},
"146 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4429218,
"Longitude": 139.6453862
},
"15 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4439383,
"Longitude": 139.6509414
},
"15-4 Beniyacho Hiratsuka Kanagawa": {
"Latitude": 35.3282167,
"Longitude": 139.3466796
},
"16-1 Totsukacho Totsuka-ku Yokohama Kanagawa": {
"Latitude": 35.4015872,
"Longitude": 139.5332269
},
"1627-1 Nippacho Kohoku-ku Yokohama Kanagawa": {
"Latitude": 35.527826,
"Longitude": 139.6109903
},
"165-4 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4436911,
"Longitude": 139.6470778
},
"18-14 Matsugaecho Minami-ku Sagamihara Kanagawa": {
"Latitude": 35.5157065,
"Longitude": 139.4241736
},
"185 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4435467,
"Longitude": 139.6473194
},
"187-8 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4427635,
"Longitude": 139.64765
},
"2-1 Ekimae Honcho Kawasaki-ku Kawasaki Kanagawa": {
"Latitude": 35.5295726,
"Longitude": 139.6986515
},
"2-1 Ogawacho Kawasaki-ku Kawasaki Kanagawa": {
"Latitude": 35.5287394,
"Longitude": 139.6988071
},
"2-1-1 Aobadai Aoba-ku Yokohama Kanagawa": {
"Latitude": 35.5421329,
"Longitude": 139.5160153
},
"2-1-10 Chuo Yamato Kanagawa": {
"Latitude": 35.470211,
"Longitude": 139.4595424
},
"2-1-15 Sakaecho Odawara Kanagawa": {
"Latitude": 35.2561539,
"Longitude": 139.157501
},
"2-1-16 Chuo Ebina Kanagawa": {
"Latitude": 35.4498843,
"Longitude": 139.3922668
},
"2-1-2 Minamifujisawa Fujisawa Kanagawa": {
"Latitude": 35.3384815,
"Longitude": 139.4888944
},
"2-1-20 Sakaecho Odawara Kanagawa": {
"Latitude": 35.2557262,
"Longitude": 139.1573677
},
"2-1-29 Sakaecho Odawara Kanagawa": {
"Latitude": 35.2555984,
"Longitude": 139.1572233
},
"2-1-3 Fukaminishi Yamato Kanagawa": {
"Latitude": 35.4751933,
"Longitude": 139.4622808
},
"2-11-23 Aobadai Aoba-ku Yokohama Kanagawa": {
"Latitude": 35.547024,
"Longitude": 139.5168094
},
"2-11-4 Tsuruyacho Kanagawa-ku Yokohama Kanagawa": {
"Latitude": 35.4694067,
"Longitude": 139.6205455
},
"2-13-9 Tsunashimanishi Kohoku-ku Yokohama Kanagawa": {
"Latitude": 35.5361866,
"Longitude": 139.6308157
},
"2-14-1 Minamisaiwai Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4640304,
"Longitude": 139.6177293
},
"2-14-12 Utsukushigaoka Aoba-ku Yokohama Kanagawa": {
"Latitude": 35.5790208,
"Longitude": 139.5595383
},
"2-15 Shonandai Fujisawa Kanagawa": {
"Latitude": 35.3960987,
"Longitude": 139.4666931
},
"2-15-4 Shinyokohama Kohoku-ku Yokohama Kanagawa": {
"Latitude": 35.5101889,
"Longitude": 139.6148737
},
"2-15-4 Utsukushigaoka Aoba-ku Yokohama Kanagawa": {
"Latitude": 35.5793486,
"Longitude": 139.5584772
},
"2-16-2 Tsuruyacho Kanagawa-ku Yokohama Kanagawa": {
"Latitude": 35.4683132,
"Longitude": 139.6231702
},
"2-17-1 Minamisaiwai Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4640692,
"Longitude": 139.6166267
},
"2-17-8 Minamisaiwai Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4637304,
"Longitude": 139.6160934
},
"2-18 Yayoicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4402721,
"Longitude": 139.6299457
},
"2-19 Tsuruyacho Kanagawa-ku Yokohama Kanagawa": {
"Latitude": 35.4691409,
"Longitude": 139.6221981
},
"2-19-12 Takashima Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4647358,
"Longitude": 139.6245619
},
"2-19-2 Utsukushigaoka Aoba-ku Yokohama Kanagawa": {
"Latitude": 35.5810622,
"Longitude": 139.5585021
},
"2-19-3 Utsukushigaoka Aoba-ku Yokohama Kanagawa": {
"Latitude": 35.5810289,
"Longitude": 139.5587965
},
"2-2 Toyookacho Tsurumi-ku Yokohama Kanagawa": {
"Latitude": 35.5089092,
"Longitude": 139.6755847
},
"2-2-5 Shonandai Fujisawa Kanagawa": {
"Latitude": 35.3966181,
"Longitude": 139.465957
},
"2-2-7 Chuo Ebina Kanagawa": {
"Latitude": 35.4486372,
"Longitude": 139.3920141
},
"2-25-1 Katahira Asao-ku Kawasaki Kanagawa": {
"Latitude": 35.59388879999999,
"Longitude": 139.4986834
},
"2-28 Bentendori Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4476518,
"Longitude": 139.6391392
},
"2-28 Miyagawacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4468574,
"Longitude": 139.629826
},
"2-28-16 Mizonokuchi Takatsu-ku Kawasaki Kanagawa": {
"Latitude": 35.6015591,
"Longitude": 139.6093429
},
"2-3-10 Shinyokohama Kohoku-ku Yokohama Kanagawa": {
"Latitude": 35.5083391,
"Longitude": 139.615121
},
"2-3-4 Sakaecho Odawara Kanagawa": {
"Latitude": 35.2564733,
"Longitude": 139.1568594
},
"2-38-2 Tennocho Hodogaya-ku Yokohama Kanagawa": {
"Latitude": 35.4548565,
"Longitude": 139.6037146
},
"2-4-1 Shinjo Nakahara-ku Kawasaki Kanagawa": {
"Latitude": 35.5836867,
"Longitude": 139.6313971
},
"2-5-10 Takashima Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.46177790000001,
"Longitude": 139.6226816
},
"2-5-14 Kizuki Nakahara-ku Kawasaki Kanagawa": {
"Latitude": 35.5646287,
"Longitude": 139.6548794
},
"2-5-25 Fujigaoka Aoba-ku Yokohama Kanagawa": {
"Latitude": 35.5438919,
"Longitude": 139.5273135
},
"2-50 Aioicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4464769,
"Longitude": 139.6383115
},
"2-52 Aioicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4465075,
"Longitude": 139.6380699
},
"2-6-11 Minamisaiwai Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4634082,
"Longitude": 139.6181932
},
"2-6-2 Minamisaiwai Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.463711,
"Longitude": 139.6184653
},
"2-6-21 Ofuna Kamakura Kanagawa": {
"Latitude": 35.3522104,
"Longitude": 139.5357934
},
"2-6-3 Nishikanagawa Kanagawa-ku Yokohama Kanagawa": {
"Latitude": 35.484989,
"Longitude": 139.6279059
},
"2-7-18 Mizonokuchi Takatsu-ku Kawasaki Kanagawa": {
"Latitude": 35.6003537,
"Longitude": 139.6098207
},
"2-7-3 Shimosakunobe Takatsu-ku Kawasaki Kanagawa": {
"Latitude": 35.6002315,
"Longitude": 139.6064961
},
"2-71-3 Hanasakicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4496626,
"Longitude": 139.6286871
},
"2-79 Nogecho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4473018,
"Longitude": 139.6293399
},
"2-9 Higashidacho Kawasaki-ku Kawasaki Kanagawa": {
"Latitude": 35.5279506,
"Longitude": 139.7018374
},
"2-9-22 Tsuruyacho Kanagawa-ku Yokohama Kanagawa": {
"Latitude": 35.4697575,
"Longitude": 139.6213898
},
"2-9-50 Chuo Ebina Kanagawa": {
"Latitude": 35.4502509,
"Longitude": 139.3954138
},
"200 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4431273,
"Longitude": 139.6434308
},
"202 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4430412,
"Longitude": 139.6436002
},
"202-1 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4430412,
"Longitude": 139.6436002
},
"216-5 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4425246,
"Longitude": 139.6438364
},
"26-2 Ekimae Honcho Kawasaki-ku Kawasaki Kanagawa": {
"Latitude": 35.5302226,
"Longitude": 139.697371
},
"2700-1 Kouzu Odawara Kanagawa": {
"Latitude": 35.2797463,
"Longitude": 139.2012721
},
"3-1-3 Konandai Konan-ku Yokohama Kanagawa": {
"Latitude": 35.3747105,
"Longitude": 139.5775402
},
"3-104 Isezakicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4424163,
"Longitude": 139.6297567
},
"3-107-12 Isezakicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4418775,
"Longitude": 139.6298595
},
"3-13-1 Shinjo Nakahara-ku Kawasaki Kanagawa": {
"Latitude": 35.5849827,
"Longitude": 139.6302862
},
"3-14-9 Sagamiono Minami-ku Sagamihara Kanagawa": {
"Latitude": 35.5324941,
"Longitude": 139.4362581
},
"3-2-27 Hamatake Chigasaki Kanagawa": {
"Latitude": 35.3358971,
"Longitude": 139.4430256
},
"3-2-48 Chuo Ebina Kanagawa": {
"Latitude": 35.4510007,
"Longitude": 139.3902697
},
"3-28-13 Shimonagaya Konan-ku Yokohama Kanagawa": {
"Latitude": 35.4078842,
"Longitude": 139.5642913
},
"3-36 Bentendori Naka-ku Yokohama Kanagawa": {
"Latitude": 35.447799,
"Longitude": 139.638667
},
"3-4-4 Harajuku Totsuka-ku Yokohama Kanagawa": {
"Latitude": 35.3817738,
"Longitude": 139.5029676
},
"3-43-4 Wakabacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4412748,
"Longitude": 139.6275875
},
"3-472 Kosugimachi Nakahara-ku Kawasaki Kanagawa": {
"Latitude": 35.5756545,
"Longitude": 139.6595533
},
"3-5-29 Koshigoe Kamakura Kanagawa": {
"Latitude": 35.3086093,
"Longitude": 139.4905609
},
"3-53 Aioicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4469241,
"Longitude": 139.6380282
},
"3-6-1 Minatomirai Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4574484,
"Longitude": 139.6348484
},
"3-6-3 Minatomirai Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4574484,
"Longitude": 139.6348484
},
"3-6-3 Seki Tama-ku Kawasaki Kanagawa": {
"Latitude": 35.6117518,
"Longitude": 139.5929968
},
"3002-23 Shimotsuruma Yamato Kanagawa": {
"Latitude": 35.4989985,
"Longitude": 139.451719
},
"3467-1 Noborito Tama-ku Kawasaki Kanagawa": {
"Latitude": 35.6202475,
"Longitude": 139.5704596
},
"3丁目51-8 Miyamotocho Minami-ku Yokohama Kanagawa": {
"Latitude": 35.4300373,
"Longitude": 139.6095506
},
"4-1 Ogawacho Kawasaki-ku Kawasaki Kanagawa": {
"Latitude": 35.5280451,
"Longitude": 139.6979238
},
"4-14-25 Chuorinkan Yamato Kanagawa": {
"Latitude": 35.5080078,
"Longitude": 139.4455886
},
"4-17-29 Konandai Konan-ku Yokohama Kanagawa": {
"Latitude": 35.375591,
"Longitude": 139.5758653
},
"4-18-4 Yabe Chuo-ku Sagamihara Kanagawa": {
"Latitude": 35.5700614,
"Longitude": 139.3885335
},
"4-2-1 Kamikodanaka Nakahara-ku Kawasaki Kanagawa": {
"Latitude": 35.5813758,
"Longitude": 139.6409824
},
"4-31-7 Kizuki Nakahara-ku Kawasaki Kanagawa": {
"Latitude": 35.5592325,
"Longitude": 139.6520937
},
"4-4-10 Kurihama Yokosuka Kanagawa": {
"Latitude": 35.2311295,
"Longitude": 139.7025864
},
"4-43 Masagocho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4457687,
"Longitude": 139.6350812
},
"4-49-14 Kamariyahigashi Kanazawa-ku Yokohama Kanagawa": {
"Latitude": 35.3461484,
"Longitude": 139.6097151
},
"4-6-2 Minatomirai Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4586949,
"Longitude": 139.6292951
},
"4-7 Toyookacho Tsurumi-ku Yokohama Kanagawa": {
"Latitude": 35.5061151,
"Longitude": 139.675196
},
"4-76 Aioicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4476268,
"Longitude": 139.6361117
},
"4233-2 Akiya Yokosuka Kanagawa": {
"Latitude": 35.2452134,
"Longitude": 139.5946093
},
"48 Fukutomicho Nishidori Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4454104,
"Longitude": 139.6305899
},
"4897 Totsukacho Totsuka-ku Yokohama Kanagawa": {
"Latitude": 35.4019982,
"Longitude": 139.5307742
},
"5-1 Chigasakichuo Tsuzuki-ku Yokohama Kanagawa": {
"Latitude": 35.5444257,
"Longitude": 139.5724217
},
"5-10-16 Seishin Chuo-ku Sagamihara Kanagawa": {
"Latitude": 35.5798611,
"Longitude": 139.3593497
},
"5-2 Ekimae Honcho Kawasaki-ku Kawasaki Kanagawa": {
"Latitude": 35.53018369999999,
"Longitude": 139.6990264
},
"5-29-17 Shimodacho Kohoku-ku Yokohama Kanagawa": {
"Latitude": 35.5574994,
"Longitude": 139.6268266
},
"5-29-25 Hino Konan-ku Yokohama Kanagawa": {
"Latitude": 35.3926334,
"Longitude": 139.5831369
},
"5-3 Omiyacho Saiwai-ku Kawasaki Kanagawa": {
"Latitude": 35.5314196,
"Longitude": 139.6933019
},
"5-62 Sumiyoshicho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4479129,
"Longitude": 139.6352839
},
"5-67 Otamachi Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4488905,
"Longitude": 139.6355144
},
"535 Shinanocho Totsuka-ku Yokohama Kanagawa": {
"Latitude": 35.4305504,
"Longitude": 139.5618854
},
"539-7 Shinanocho Totsuka-ku Yokohama Kanagawa": {
"Latitude": 35.4310808,
"Longitude": 139.5570912
},
"543 Iizumi Odawara Kanagawa": {
"Latitude": 35.2829812,
"Longitude": 139.169334
},
"555 Fujisawa Fujisawa Kanagawa": {
"Latitude": 35.3399174,
"Longitude": 139.4869807
},
"599 Kamonomiya Odawara Kanagawa": {
"Latitude": 35.2812984,
"Longitude": 139.1775054
},
"6-5-2 Suge Tama-ku Kawasaki Kanagawa": {
"Latitude": 35.6382498,
"Longitude": 139.5239323
},
"61-1 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.4438856,
"Longitude": 139.6488554
},
"7-7 Ekimae Honcho Kawasaki-ku Kawasaki Kanagawa": {
"Latitude": 35.5305614,
"Longitude": 139.6996042
},
"769-2 Shinmarukomachi Nakahara-ku Kawasaki Kanagawa": {
"Latitude": 35.5797788,
"Longitude": 139.6610528
},
"8-19 Ekimae Honcho Kawasaki-ku Kawasaki Kanagawa": {
"Latitude": 35.5314724,
"Longitude": 139.7003541
},
"88 Yamashitacho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.44223849999999,
"Longitude": 139.6502998
},
"9-27-6 Konandai Konan-ku Yokohama Kanagawa": {
"Latitude": 35.3699639,
"Longitude": 139.577443
},
"984-4 Sengokuhara Hakone Ashigarashimo-gun Kanagawa": {
"Latitude": 35.2696857,
"Longitude": 139.0151855
},
"Eirakucho Minami-ku Yokohama Kanagawa": {
"Latitude": 35.4377752,
"Longitude": 139.6312846
},
"Hagoromocho Naka-ku Yokohama Kanagawa": {
"Latitude": 35.442769,
"Longitude": 139.6329232
},
"Hashimoto Midori-ku Sagamihara Kanagawa": {
"Latitude": 35.5996687,
"Longitude": 139.3418118
},
"Hiyoshihoncho Kohoku-ku Yokohama Kanagawa": {
"Latitude": 35.5537223,
"Longitude": 139.6456778
},
"Noborito Tama-ku Kawasaki Kanagawa": {
"Latitude": 35.6205085,
"Longitude": 139.5687792
},
"Seya-ku Yokohama Kanagawa": {
"Latitude": 35.4660263,
"Longitude": 139.4988596
},
"Takashima Nishi-ku Yokohama Kanagawa": {
"Latitude": 35.4622889,
"Longitude": 139.6222899
},
"神奈川県横浜市旭区鶴ヶ峰2-3-1": {
"Latitude": 35.475278,
"Longitude": 139.5464557
},
"神奈川県足柄下郡箱根町仙石原品の木940": {
"Latitude": 35.26654449999999,
"Longitude": 139.015841
}
}

File diff suppressed because it is too large Load Diff

View File

@ -27,6 +27,7 @@ import (
"io/ioutil" "io/ioutil"
"os" "os"
"sync" "sync"
"time"
"github.com/kellydunn/golang-geo" "github.com/kellydunn/golang-geo"
) )
@ -37,16 +38,16 @@ type geoCoord struct {
} }
type geoCache struct { type geoCache struct {
cacheFile string filename string
addressCache map[string]geoCoord data map[string]geoCoord
geocoder geo.GoogleGeocoder mutex sync.Mutex
mutex sync.Mutex coder geo.GoogleGeocoder
} }
func newGeoCache(cacheFile string) (*geoCache, error) { func newGeoCache(filename string) (*geoCache, error) {
cache := &geoCache{ cache := &geoCache{
cacheFile: cacheFile, filename: filename,
addressCache: make(map[string]geoCoord)} data: make(map[string]geoCoord)}
if err := cache.load(); err != nil { if err := cache.load(); err != nil {
return nil, err return nil, err
@ -56,7 +57,7 @@ func newGeoCache(cacheFile string) (*geoCache, error) {
} }
func (c *geoCache) load() error { func (c *geoCache) load() error {
file, err := os.Open(c.cacheFile) file, err := os.Open(c.filename)
if os.IsNotExist(err) { if os.IsNotExist(err) {
return nil return nil
} }
@ -65,24 +66,24 @@ func (c *geoCache) load() error {
} }
defer file.Close() defer file.Close()
return json.NewDecoder(file).Decode(&c.addressCache) return json.NewDecoder(file).Decode(&c.data)
} }
func (c *geoCache) save() error { func (c *geoCache) save() error {
js, err := json.MarshalIndent(c.addressCache, "", " ") js, err := json.MarshalIndent(c.data, "", " ")
if err != nil { if err != nil {
return err return err
} }
return ioutil.WriteFile(c.cacheFile, js, 0644) return ioutil.WriteFile(c.filename, js, 0644)
} }
func (c *geoCache) decode(address string) (geoCoord, error) { func (c *geoCache) decode(address string) (geoCoord, error) {
if coord, ok := c.addressCache[address]; ok { if coord, ok := c.data[address]; ok {
return coord, nil return coord, nil
} }
point, err := c.geocoder.Geocode(address) point, err := c.coder.Geocode(address)
if err != nil { if err != nil {
return geoCoord{}, err return geoCoord{}, err
} }
@ -90,8 +91,9 @@ func (c *geoCache) decode(address string) (geoCoord, error) {
coord := geoCoord{point.Lat(), point.Lng()} coord := geoCoord{point.Lat(), point.Lng()}
c.mutex.Lock() c.mutex.Lock()
c.addressCache[address] = coord c.data[address] = coord
c.mutex.Unlock() c.mutex.Unlock()
time.Sleep(200 * time.Millisecond)
return coord, nil return coord, nil
} }

View File

@ -131,7 +131,12 @@ func scrapeReview(url string, rc chan tabelogReview, wg *sync.WaitGroup, wc *web
coord, err := gc.decode(review.Address) coord, err := gc.decode(review.Address)
if err != nil { if err != nil {
log.Fatal(err) switch err.Error() {
case "ZERO_RESULTS":
return
default:
log.Fatal(err)
}
} }
review.Latitude = coord.Latitude review.Latitude = coord.Latitude
@ -155,9 +160,9 @@ func scrapeIndex(url string, out chan tabelogReview, wc *webCache, gc *geoCache)
}) })
wg.Wait() wg.Wait()
// if href, ok := doc.Find("a.c-pagination__target--next").Attr("href"); ok { if href, ok := doc.Find("a.c-pagination__target--next").Attr("href"); ok {
// scrapeIndex(makeAbsUrl(url, href), out, wc, gc) scrapeIndex(makeAbsUrl(url, href), out, wc, gc)
// } }
} }
func scrapeTabelog(url, resultFile, webCacheDir, geoCacheFile string) { func scrapeTabelog(url, resultFile, webCacheDir, geoCacheFile string) {