-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcreatedatabase.PL
executable file
·4792 lines (4541 loc) · 145 KB
/
createdatabase.PL
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env perl
# Import geo-coding data into an SQLite database.
# Software copyright 2020-2024 Nigel Horne.
# Except for the "known_places" database, all the databases are copyrighted by third parties.
# I've tried my best to acknowledge that, but if I haven't please let me know.
# The program code is released under the following licence: GPL2 for personal use on a single computer.
# All other users (including Commercial, Charity, Educational, Government)
# must apply in writing for a licence for use from Nigel Horne at <njh at nigelhorne.com>.
# -f: force a build, otherwise it won't build on CPAN smokers or if the
# database already exists
# Set OSM_HOME, OPENADDR_HOME, DR5HN_HOME and WHOSONFIRST_HOME to the directories where the data will be downloaded
# see bin/download_databases which will download the databases and call this script
# Download the OPENADDR_HOME data from http://results.openaddresses.io.
# cd $OPENADDR_HOME
# wget --quiet https://data.openaddresses.io/openaddr-collected-global.zip
# wget --quiet https://data.openaddresses.io/openaddr-collected-global-sa.zip
# or
# wget -nc --quiet https://s3.amazonaws.com/data.openaddresses.io/openaddr-collected-global.zip
# wget -nc --quiet https://s3.amazonaws.com/data.openaddresses.io/openaddr-collected-global-sa.zip
# unzip openaddr-collected-global.zip
# unzip openaddr-collected-global-sa.zip
# Remove all the data you're not going to use, I only keep au, ca, us
# echo ?? | sed 's/ /\n/g' | egrep -v '(au|ca|us)' | xargs rm -rf
# rm -rf summary
# Download the WHOSONFIRST_HOME data from repositories such as
# https://github.com/whosonfirst-data/whosonfirst-data-venue-us.git
# I use whosonfirst-data-[venue|admin]-[au|gb|us|ca].git
# I use whosonfirst-data-[venue]-us-??.git
# Download the DR5HN database:
# cd $DR5HN_HOME && git clone https://github.com/dr5hn/countries-states-cities-database.git
# Openstreetmap.org data
# cd $OSM_HOME && /usr/bin/wget https://download.geofabrik.de/europe-latest.osm.bz2
# Note that this can take a day to load in just AU, CA, GB, US
# You can look up a WOF place by https://spelunker.whosonfirst.org/id/$locality_id
#
# Try:
# sqlite3 whosonfirst-data-latest.db
# select body from geojson where body like '%north shields%';
# It'll be slow, but it shows the sort of thing this is about,
# You'll see an id: field (e.g. 1108937103), then look at
# https://spelunker.whosonfirst.org/id/1108937103
# TODO: perhaps use a layered approach to the database schema
# TODO: import https://raw.githubusercontent.com/dr5hn/countries-states-cities-database/master/countries%2Bstates%2Bcities.json
# TODO: as the database is a simple key/value pair, perhaps CDB will be better
use 5.010;
use strict;
use warnings;
# use autodie qw(:all);
use autodie; # Don't want system() to die, we catch failures
use Cwd;
use Data::Dumper;
# use BerkeleyDB;
use DB_File;
use DBD::SQLite::Constants qw/:file_open/; # For SQLITE_OPEN_READONLY
use DBI;
use File::Copy;
use File::Slurp;
use Geo::Coder::Abbreviations;
use JSON::MaybeXS;
use LWP::UserAgent::Throttled;
use Locale::AU; # TODO: use Locale::Geocode
use Locale::CA;
use Locale::Country;
use Locale::US;
use Digest::MD5;
use Encode;
use Geo::StreetAddress::US;
use CHI;
use CHI::Driver::RawMemory;
use File::Basename;
use File::Spec;
use Lingua::EN::AddressParse;
use Locale::SubCountry;
use Text::CSV;
use Try::Tiny;
use Devel::Size;
# ONE or ALL - import from one database or all of them
# ALL uses HUGE amounts of RAM
use constant BUILDMODE => 'ALL';
use constant AIO_READAHEAD_SIZE => 1048576; # 1MB
use constant DEBUG_OFF => 0;
use constant DEBUG_INVALID_LENGTH => 1;
use constant DEBUG_L_EN_A => 2;
use constant DEBUG_NEW_LOCATION => 4;
use constant DEBUG_DETERMINE_LOCATION => 8;
use constant DEBUG_GET_WOF => 0x10;
use constant DEBUG_BREAKUP => 0x20;
use constant DEBUG_DATA_VALIDATE => 0x40;
use constant DEBUG_FLUSH => 0x80;
use constant DEBUG_SIZE => 0x100;
use constant DEBUG_MD5 => 0x200;
use constant DEBUG_INSERT => 0x400;
use constant DEBUG_KNOWN_PLACES => 0x800; # Only import the known_places hash
use constant DEBUG_OSM => 0x1000; # Test - and only import, the OSM_HOME data
use constant DEBUG_WOF => 0x2000; # Test - and only import, the WHOSONFIRST_HOME data
use constant DEBUG_ALL => 0xFFFF;
use constant DEBUG => DEBUG_OFF;
use constant MAX_INSERT_COUNT => 250; # Maximum number of CSV rows to insert in a single statement
# use constant MAX_INSERT_COUNT => 1; # Maximum number of CSV rows to insert in a single statement
binmode(STDOUT, "encoding(UTF-8)");
binmode(STDERR, "encoding(UTF-8)");
my %zipcodes = (
'04350' => { city => 'Litchfield', county => 'Kennebec' },
'04410' => { city => 'Bradford', county => 'Penobscot' },
'04490' => { city => 'Topsfield', county => 'Washington' },
'04653' => { city => 'Bass Harbor', county => 'Hancock' },
'04654' => { city => 'Machias', county => 'Washington' },
'04664' => { city => 'Sullivan', county => 'Hancock' },
'04674' => { city => 'Seal Cove', county => 'Hancock' },
'04677' => { city => 'Sorrento', county => 'Hancock' },
'04679' => { city => 'Southwest Harbor', county => 'Hancock' },
'04681' => { city => 'Stonington', county => 'Hancock' },
'04685' => { city => 'Swans Island', county => 'Hancock' },
'04787' => { city => 'Westfield', county => 'Aroostook' },
'04984' => { city => 'Temple', county => 'Franklin' },
'32346' => { city => 'Panacea', county => 'Wakulla' },
'46204' => { city => 'Indianapolis', county => 'Marion' },
'46206' => { city => 'Indianapolis', county => 'Marion' },
'46222' => { city => 'Indianapolis', county => 'Marion' },
'46231' => { city => 'Indianapolis', county => 'Marion' },
'46282' => { city => 'Indianapolis', county => 'Marion' },
'46259' => { city => 'Indianapolis', county => 'Marion' },
'47001' => { city => 'Aurora', county => 'Dearborn' },
'47864' => { city => 'New Lebanon', county => 'Sullivan' },
'59276' => { city => 'Whitetail', county => 'Daniels' },
'59645' => { city => 'White Sulphur Springs', county => 'Meagher' },
'80011' => { city => 'Aurora', county => 'Arapahoe' },
'80015' => { city => 'Aurora', county => 'Arapahoe' },
'80016' => { city => 'Aurora', county => 'Arapahoe' },
'80018' => { city => 'Aurora', county => 'Arapahoe' },
'80131' => { city => 'Louviers', county => 'Douglas' },
'80118' => { city => 'Larkspur', county => 'Douglas' },
'80202' => { city => 'Denver', county => 'Adams' },
'80218' => { city => 'Denver', county => 'Adams' },
'80221' => { city => 'Denver', county => 'Adams' },
'80222' => { city => 'Denver', county => 'Adams' },
'80230' => { city => 'Denver', county => 'Adams' },
'80233' => { city => 'Denver', county => 'Adams' },
'80234' => { city => 'Denver', county => 'Adams' },
'80236' => { city => 'Denver', county => 'Adams' },
'80241' => { city => 'Denver', county => 'Adams' },
'80293' => { city => 'Denver', county => 'Adams' },
'80294' => { city => 'Denver', county => 'Adams' },
'81501' => { city => 'Grand Junction', county => 'Mesa' },
'81507' => { city => 'Grand Junction', county => 'Mesa' },
'81432' => { city => 'Ridgway', county => 'Ouray' },
'80513' => { city => 'Berthoud', county => 'Larimer' },
'80516' => { city => 'Erie', county => 'Weld' },
'80550' => { city => 'Windsor', county => 'Weld' },
'80610' => { city => 'Auld', county => 'Weld' },
'80615' => { city => 'Eaton', county => 'Weld' },
'80631' => { city => 'Greeley', county => 'Weld' },
'80634' => { city => 'Greeley', county => 'Weld' },
'80642' => { city => 'Hudson', county => 'Weld' },
'80645' => { city => 'La Salle', county => 'Weld' },
'80650' => { city => 'Pierce', county => 'Weld' },
);
my %openaddresses_countries = (
'au' => 1,
'ca' => 1,
'us' => 1,
);
my @whosonfirst_only_countries = (
'gb'
);
my %osm_countries = (
us => 1,
canada => 1,
gb => 1,
australia => 1
);
my %max_state_lengths = (
'AU' => 3,
'CA' => 2,
'US' => 2
);
# TODO: Use Geo::Coder::Free::Local, until then keep the data in sync
# Ensure you use abbreviations, e.e. RD not ROAD
my %known_places = ( # Places I've checked with my GPS
'us/ks/statewide.csv' => [
{
'LAT' => 39.005175,
'LON' => -95.706681,
'NUMBER' => 3516,
'STREET' => 'SW MACVICAR AVE',
'CITY' => 'TOPEKA',
'COUNTY' => 'SHAWNEE',
'STATE' => 'KS',
'COUNTRY' => 'US',
'POSTCODE' => 66611,
},
], 'us/md/statewide.csv' => [
{
'LAT' => 39.467270,
'LON' => -76.823947,
'NAME' => 'ALL SAINTS EPISCOPAL CHURCH',
'NUMBER' => 203,
'STREET' => 'E CHATSWORTH RD',
'CITY' => 'REISTERSTOWN',
'COUNTY' => 'BALTIMORE',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 21136
}, {
'LAT' => 39.6852333333333,
'LON' => -76.6071166666667,
'NUMBER' => 7,
'STREET' => 'JORDAN MILL COURT',
'CITY' => 'WHITE HALL',
'COUNTY' => 'BALTIMORE',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 21161
}, {
'LAT' => 39.633018,
'LON' => -76.272558,
'NAME' => 'BALLPARK RESTAURANT',
'NUMBER' => 3418,
'STREET' => 'CONOWINGO RD',
'CITY' => 'DUBLIN',
'COUNTY' => 'HARFORD',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 21154
}, {
'NAME' => 'NCBI',
'LAT' => 38.99516556,
'LON' => -77.09943963,
'STREET' => 'MEDLARS DR',
'CITY' => 'BETHESDA',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20894,
}, {
'LAT' => 38.99698114,
'LON' => -77.10031119,
'STREET' => 'CENTER DR',
'CITY' => 'BETHESDA',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
}, {
# 'NAME' => 'BOLD BITE',
'LAT' => 38.98939358,
'LON' => -77.09819543,
'STREET' => 'NORFOLK AVE',
'CITY' => 'BETHESDA',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
}, {
'LAT' => 38.9890861111111,
'LON' => -77.0975722222222,
'NAME' => 'ROCK BOTTOM RESTAURANT & BREWERY',
'STREET' => 'NORFOLK AVE',
'CITY' => 'BETHESDA',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20814
}, {
'LAT' => 39.028326,
'LON' => -77.136774,
'NAME' => 'THE ATRIUM AT ROCK SPRING PARK',
'NUMBER' => 6555,
'STREET' => 'ROCKLEDGE DR',
'CITY' => 'BETHESDA',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20852,
}, {
'LAT' => 39.2244603797302,
'LON' => -77.449615439877,
'STREET' => 'MOUTH OF MONOCACY RD',
'CITY' => 'DICKERSON',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20842,
}, {
'NAME' => 'PATAPSCO VALLEY STATE PARK',
'LAT' => 39.29491,
'LON' => -76.78051,
'NUMBER' => 8020,
'STREET' => 'BALTIMORE NATIONAL PK',
'CITY' => 'ELLICOTT CITY',
'COUNTY' => 'HOWARD',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 21043,
}, {
'LAT' => 39.683529,
'LON' => -77.349405,
'STREET' => 'ANNANDALE RD',
'CITY' => 'EMMITSBURG',
'COUNTY' => 'FREDERICK',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 21727
}, {
'NAME' => 'UTICA DISTRICT PARK',
'LAT' => 39.5167883333333,
'LON' => -77.4015166666667,
'CITY' => 'FREDERICK',
'COUNTY' => 'FREDERICK',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 21701,
}, {
'LAT' => 39.342986,
'LON' => -77.239770,
'NUMBER' => 3923,
'STREET' => 'SUGARLOAF CT',
'CITY' => 'MONROVIA',
'COUNTY' => 'FREDERICK',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 21770
}, {
'LAT' => 39.028404,
'LON' => -77.073227,
'NUMBER' => 10540,
'STREET' => 'METROPOLITAN AVE',
'CITY' => 'KENSINGTON',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20895
}, {
'NAME' => 'ALBERT EINSTEIN HIGH SCHOOL',
'LAT' => 39.03869019,
'LON' => -77.0682871,
'NUMBER' => 11135,
'STREET' => 'NEWPORT MILL RD',
'CITY' => 'KENSINGTON',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20895
}, {
'NAME' => 'POST OFFICE',
'LAT' => 39.02554455,
'LON' => -77.07178215,
'NUMBER' => 10325,
'STREET' => 'KENSINGTON PKWY',
'CITY' => 'KENSINGTON',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20895
}, {
'NAME' => 'NEWPORT MILL MIDDLE SCHOOL',
'LAT' => 39.0416107,
'LON' => -77.06884708,
'NUMBER' => 11311,
'STREET' => 'NEWPORT MILL RD',
'CITY' => 'KENSINGTON',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20895
}, {
'NAME' => 'SAFEWAY',
'LAT' => 39.02822438,
'LON' => -77.0755196,
'NUMBER' => 10541,
'STREET' => 'HOWARD AVE',
'CITY' => 'KENSINGTON',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20895
}, {
'NAME' => 'HAIR CUTTERY',
'LAT' => 39.03323865,
'LON' => -77.07368044,
'NUMBER' => 3731,
'STREET' => 'CONNECTICUT AVE',
'CITY' => 'KENSINGTON',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
}, {
'NAME' => 'STROSNIDERS',
'LAT' => 39.02781493,
'LON' => -77.07740792,
'NUMBER' => 10504,
'STREET' => 'CONNECTICUT AVE',
'CITY' => 'KENSINGTON',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
}, {
'LAT' => 39.100869,
'LON' => -76.812162,
'NUMBER' => 8616,
'STREET' => 'SAVANNAH RIVER RD',
'CITY' => 'LAUREL',
'COUNTY' => 'ANNE ARUNDEL',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20724
}, {
'LAT' => 39.110711,
'LON' => -76.434062,
'NAME' => 'DOWNS PARK',
'STREET' => 'CHESAPEAKE BAY DRIVE',
'CITY' => 'PASADENA',
'COUNTY' => 'ANNE ARUNDEL',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 21122
}, {
'LAT' => 39.102637,
'LON' => -76.456384,
'NUMBER' => 1559,
'STREET' => 'GUERDON CT',
'CITY' => 'PASADENA',
'COUNTY' => 'ANNE ARUNDEL',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 21122
}, {
'LAT' => 39.017633,
'LON' => -77.049551,
'NUMBER' => 9904,
'STREET' => 'GARDINER AVE',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20902,
}, {
'LAT' => 39.010801,
'LON' => -77.041771,
'NAME' => 'CVS',
'NUMBER' => 9520,
'STREET' => 'GEORGIA AVE',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20910
}, {
'NAME' => 'FOREST GLEN MEDICAL CENTER',
'LAT' => 39.016042,
'LON' => -77.042148,
'NUMBER' => 9801,
'STREET' => 'GEORGIA AVE',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20902,
}, {
'LAT' => 39.019575,
'LON' => -77.047453,
'NUMBER' => 10009,
'STREET' => 'GREELEY AVE',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20902
}, {
'NAME' => 'ADVENTIST HOSPITAL',
'LAT' => 39.049570,
'LON' => -76.956882,
'NUMBER' => 11886,
'STREET' => 'HEALING WAY',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20904,
}, {
'LAT' => 39.019385,
'LON' => -77.049779,
'NUMBER' => 2322,
'STREET' => 'HILDAROSE DR',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20902,
}, {
'NAME' => 'LA CASITA PUPESERIA AND MARKET',
'LAT' => 38.993369,
'LON' => -77.009501,
'NUMBER' => 8214,
'STREET' => 'PINEY BRANCH RD',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20910,
}, {
'LAT' => 38.991667,
'LON' => -77.030473,
'NAME' => 'NOAA LIBRARY',
'NUMBER' => 1315,
'STREET' => 'EAST-WEST HIGHWAY',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20910
}, {
'NAME' => 'SNIDERS',
'LAT' => 39.0088797,
'LON' => -77.04162824,
'NUMBER' => 1936,
'STREET' => 'SEMINARY RD',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20910,
}, {
'LAT' => 39.008961,
'LON' => -77.043030,
'NUMBER' => 1954,
'STREET' => 'SEMINARY RD',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20910,
}, {
'LAT' => 39.008845,
'LON' => -77.043317,
'NUMBER' => 1956,
'STREET' => 'SEMINARY RD',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20910,
}, {
'LAT' => 39.008810,
'LON' => -77.048953,
'NUMBER' => 9315,
'STREET' => 'WARREN ST',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20910,
}, {
'LAT' => 39.036439,
'LON' => -77.025502,
'NAME' => 'ARCOLA HEALTH AND REHABILITATION CENTER',
'NUMBER' => 901,
'STREET' => 'ARCOLA AVE',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20910,
}, {
'LAT' => 39.010447,
'LON' => -77.048548,
'NUMBER' => 9411,
'STREET' => 'WARREN ST',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20910,
}, {
'NAME' => 'SILVER DINER',
'LAT' => 39.05798753,
'LON' => -77.12165374,
'NUMBER' => 12276,
'STREET' => 'ROCKVILLE PK',
'CITY' => 'ROCKVILLE',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20852
}, {
# LF
'LAT' => 39.07669788,
'LON' => -77.12306436,
'NUMBER' => 1605,
'STREET' => 'VIERS MILL RD',
'CITY' => 'ROCKVILLE',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20851
}, {
'LAT' => 39.075583,
'LON' => -77.123833,
'NUMBER' => 1406,
'STREET' => 'LANGBROOK PLACE',
'CITY' => 'ROCKVILLE',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20851
}, {
'LAT' => 39.015394,
'LON' => -77.048357,
'NUMBER' => 2225,
'STREET' => 'FOREST GLEN RD',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20910
}, {
'LAT' => 39.0147541,
'LON' => -77.05466857,
'NAME' => 'BP',
'NUMBER' => 2601,
'STREET' => 'FOREST GLEN RD',
'CITY' => 'SILVER SPRING',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20910
}, {
'LAT' => 39.06412645,
'LON' => -77.11252263,
'NAME' => 'OMEGA STUDIOS',
'NUMBER' => 12412, # Suite 14A
'CITY' => 'ROCKVILLE',
'COUNTY' => 'MONTGOMERY',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20852
}, {
'LAT' => 39.033075,
'LON' => -76.923859,
'NUMBER' => 10424,
'STREET' => '43RD AVE',
'CITY' => 'BELTSVILLE',
'COUNTY' => 'PRINCE GEORGE',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20705
}, {
'LAT' => 38.996764,
'LON' => -76.849323,
'NAME' => 'NASA',
'STREET' => 'TIROS RD',
'CITY' => 'GREENBELT',
'COUNTY' => 'PRINCE GEORGE',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 20771
}, {
'LAT' => 39.190009,
'LON' => -76.841152,
'NUMBER' => 7001,
'ROAD' => 'CRADLEROCK FARM COURT',
'CITY' => 'COLUMBIA',
'COUNTY' => 'HOWARD',
'STATE' => 'MD',
'COUNTRY' => 'US',
'POSTCODE' => 21045,
}
], 'us/me/statewide.csv' => [
{
'LAT' => 44.35378018,
'LON' => -68.57383976,
'NUMBER' => 86,
'STREET' => 'ALLEN POINT LANE',
'CITY' => 'BLUE HILLS',
'COUNTY' => 'HANCOCK',
'STATE' => 'ME',
'COUNTRY' => 'US',
'POSTCODE' => 04614
}, {
'LAT' => 44.406700,
'LON' => -68.597114,
'NAME' => 'BANGOR AIRPORT',
'STREET' => 'GODFREY BOULEVARD',
'CITY' => 'BANGOR',
'COUNTY' => 'PENOBSCOT',
'STATE' => 'ME',
'COUNTRY' => 'US',
'POSTCODE' => 04401
}, {
'LAT' => 44.40670019,
'LON' => -68.59711438,
'NAME' => 'TRADEWINDS',
'NUMBER' => 15,
'STREET' => 'SOUTH STREET',
'CITY' => 'BLUE HILLS',
'COUNTY' => 'HANCOCK',
'STATE' => 'ME',
'COUNTRY' => 'US',
'POSTCODE' => 04614
}, {
'LAT' => 44.40662476,
'LON' => -68.59610059,
'NAME' => 'RITE AID',
'NUMBER' => 17,
'STREET' => 'SOUTH STREET',
'CITY' => 'BLUE HILLS',
'COUNTY' => 'HANCOCK',
'STATE' => 'ME',
'COUNTRY' => 'US',
'POSTCODE' => 04614
}
], 'us/dc/statewide.csv' => [
{
'LAT' => 38.955403,
'LON' => -76.996241,
'NUMBER' => 5350,
'STREET' => 'CHILLUM PLACE NE',
'CITY' => 'WASHINGTON',
'STATE' => 'DC',
'COUNTRY' => 'US',
'POSTCODE' => 20011
}, {
'LAT' => 38.904022,
'LON' => -77.023113,
'NAME' => 'WALTER E. WASHINGTON CONVENTION CENTER',
'NUMBER' => 801,
'STREET' => 'MT VERNON PL NW',
'CITY' => 'WASHINGTON',
'STATE' => 'DC',
'COUNTRY' => 'US',
'POSTCODE' => 20001
}
], 'us/id/statewide.csv' => [
{
'LAT' => 47.693615,
'LON' => -116.915357,
'NUMBER' => 880,
'STREET' => 'SOUTH GREENSFERRY RD',
'CITY' => "COUER D'ALENE",
'COUNTY' => 'KOOTENAI',
'STATE' => 'ID',
'POSTCODE' => 83814
}, {
'LAT' => 47.69556,
'LON' => -116.91564,
'NUMBER' => 898,
'STREET' => 'SOUTH GREENSFERRY RD',
'CITY' => "COUER D'ALENE",
'COUNTY' => 'KOOTENAI',
'STATE' => 'ID',
'POSTCODE' => 83814
}
], 'us/in/statewide.csv' => [
{
'LAT' => 41.074247,
'LON' => -85.138531,
'ROAD' => 'DOUGLAS AVE',
'CITY' => 'FORT WAYNE',
'COUNTY' => 'ALLEN',
'STATE' => 'IN',
'COUNTRY' => 'US',
'POSTCODE' => 46802,
}
], 'us/oh/statewide.csv' => [
{
'LAT' => 39.997959,
'LON' => -82.881320,
'NAME' => 'JOHN GLENN AIRPORT',
'NUMBER' => 4600,
'ROAD' => 'INTERNATIONAL GATEWAY',
'CITY' => 'COLUMBUS',
'COUNTY' => 'FRANKLIN',
'STATE' => 'OH',
'COUNTRY' => 'US',
'POSTCODE' => 43219,
}, {
'LAT' => 41.379695,
'LON' => -82.222877,
'NAME' => 'MIDDLE RIDGE PLAZA',
'CITY' => 'AMHERST',
'COUNTY' => 'LOHRAIN',
'STATE' => 'OH',
'COUNTRY' => 'US',
'POSTCODE' => 44001
}, {
'LAT' => 40.097097,
'LON' => -83.123745,
'NAME' => 'RESIDENCE INN BY MARRIOTT',
'NUMBER' => '6364',
'STREET' => 'FRANTZ RD',
'CITY' => 'DUBLIN',
'STATE' => 'OH',
'COUNTRY' => 'US',
'POSTCODE' => 43017
}, {
'LAT' => 41.291654,
'LON' => -81.675815,
'NAME' => 'TOWPATH TRAVEL PLAZA',
'CITY' => 'BROADVIEW HEIGHTS',
'COUNTY' => 'CUYAHOGA',
'STATE' => 'OH',
'COUNTRY' => 'US',
'POSTCODE' => 44147
}
], 'us/pa/statewide.csv' => [
{
'LAT' => 40.206267,
'LON' => -79.565682,
'NAME' => 'NEW STANTON SERVICE PLAZA',
'CITY' => 'HEMPFIELD',
'STATE' => 'PA',
'COUNTRY' => 'US',
'POSTCODE' => 15639
}, {
'LAT' => 40.154989,
'LON' => -76.304266,
'CITY' => 'LITITZ',
'COUNTY' => 'LANCASTER',
'STATE' => 'PA',
'COUNTRY' => 'US',
}, {
'LAT' => 39.999154,
'LON' => -79.046526,
'NAME' => 'SOUTH SOMERSET SERVICE PLAZA',
'CITY' => 'SOMERSET',
'COUNTY' => 'SOMERSET',
'STATE' => 'PA',
'COUNTRY' => 'US',
'POSTCODE' => 15501
}
], 'us/va/statewide.csv' => [
{
'LAT' => 38.75422,
'LON' => -77.1058666666667,
'NAME' => 'HUNTLEY MEADOWS PARK',
'NUMBER' => 3701,
'STREET' => 'LOCKHEED BLVD',
'CITY' => 'ALEXANDRIA',
'STATE' => 'VA',
'COUNTRY' => 'US',
'POSTCODE' => 22306
}, {
'LAT' => 39.142146,
'LON' => -77.866468,
'NAME' => 'SHENANDOAH COOL SPRINGS BATTLEFIELD',
'CITY' => 'BLUEMONT',
'COUNTY' => 'CLARKE',
'STATE' => 'VA',
'COUNTRY' => 'US',
}, {
'LAT' => 38.873934,
'LON' => -77.461939,
'NUMBER' => 14900,
'STEET' => 'CONFERENCE CENTER DR',
'CITY' => 'CHANTILLY',
'COUNTY' => 'FAIRFAX',
'STATE' => 'VA',
'COUNTRY' => 'US',
'POSTCODE' => 20151
}, {
'LAT' => 38.915635,
'LON' => -77.225730,
'NAME' => 'THE CAPITAL GRILLE RESTAURANT',
'NUMBER' => 1861,
'STEET' => 'INTERNATIONAL DR',
'CITY' => 'MCLEAN',
'COUNTY' => 'FAIRFAX',
'STATE' => 'VA',
'COUNTRY' => 'US',
'POSTCODE' => 22102
}, {
'LAT' => 44.40662476,
'LON' => -68.59610059,
'NAME' => 'THE PURE PASTY COMPANY',
'NUMBER' => '128C',
'STREET' => 'MAPLE AVE W',
'CITY' => 'VIENNA',
'COUNTY' => 'FAIRFAX',
'STATE' => 'VA',
'COUNTRY' => 'US',
'POSTCODE' => 22180
}, {
'LAT' => 39.099655,
'LON' => -77.836975,
'NAME' => 'DIRT FARM BREWERY',
'NUMBER' => 18701,
'STREET' => 'FOGGY BOTTOM RD',
'CITY' => 'BLUEMONT',
'COUNTY' => 'LOUDON',
'STATE' => 'VA',
'COUNTRY' => 'US',
'POSTCODE' => 20135
}, {
'LAT' => 39.124843,
'LON' => -77.535445,
'NUMBER' => 818,
'STREET' => 'FERNDALE TERRACE NE',
'CITY' => 'LEESBURG',
'COUNTY' => 'LOUDOUN',
'STATE' => 'VA',
'COUNTRY' => 'US',
'POSTCODE' => 20176
}, {
'LAT' => 39.04071,
'LON' => -77.61682,
'STREET' => 'OATLANDS PLANTATION LN',
'CITY' => 'OATLANDS',
'COUNTY' => 'LOUDOUN',
'STATE' => 'VA',
'COUNTRY' => 'US',
'POSTCODE' => 20175
}, {
'LAT' => 39.136193,
'LON' => -77.693198,
'STREET' => 'PURCELLVILLE GATEWAY DR',
'CITY' => 'PURCELLVILLE',
'COUNTY' => 'LOUDOUN',
'STATE' => 'VA',
'COUNTRY' => 'US',
'POSTCODE' => 20132
}, {
'LAT' => 38.25075,
'LON' => -76.9602533333333,
'CITY' => 'COLONIAL BEACH',
'COUNTY' => 'WESTMORELAND',
'STATE' => 'VA',
'COUNTRY' => 'US',
'POSTCODE' => 22443
}
], 'other' => [
{
'LAT' => 51.926793,
'LON' => 0.70408,
'NAME' => 'ST ANDREWS CHURCH',
'STREET' => 'CHURCH HILL',
'CITY' => 'EARLS COLNE',
'STATE' => 'ESSEX',
'COUNTRY' => 'GB'
}, {
'LAT' => 51.358967,
'LON' => 1.391367,
'NAME' => 'WESTWOOD CROSS',
'NUMBER' => 23,
'STREET' => 'MARGATE RD',
'CITY' => 'BROADSTAIRS',
'STATE' => 'KENT',
'COUNTRY' => 'GB',
}, {
'LAT' => 51.37875,
'LON' => 1.1955,
'NAME' => 'RECULVER ABBEY',
'STREET' => 'RECULVER',
'CITY' => 'HERNE BAY',
'STATE' => 'KENT',
'COUNTRY' => 'GB',
}, {
'LAT' => 51.357510,
'LON' => 1.388894,
'NAME' => 'TOBY CARVERY',
'STREET' => 'NEW HAINE RD',
'CITY' => 'RAMSGATE',
'STATE' => 'KENT',
'COUNTRY' => 'GB',
}, {
'LAT' => 51.334522,
'LON' => 1.314417,
'NAME' => 'NEW INN',
'NUMBER' => 2,
'STREET' => 'TOTHILL ST',
# 'CITY' => 'MINSTER, THANET',
'CITY' => 'RAMSGATE',
'STATE' => 'KENT',
'COUNTRY' => 'GB',
}, {
'LAT' => 51.34320725,
'LON' => 1.31680853,
'NAME' => 'HOLIDAY INN EXPRESS',
'STREET' => 'TOTHILL ST',
# 'CITY' => 'MINSTER, THANET',