diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0045d2e..e39bfcc 100755 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,6 +11,13 @@ Future TODOs: * locations, expected results for all different methods, * parameterised tests + +6.1.9 (2022-12-06) +------------------ + +* updated the data to `2022g `__. + + 6.1.8 (2022-11-25) ------------------ diff --git a/current_data_statistics.txt b/current_data_statistics.txt index e418d58..0e341f7 100644 --- a/current_data_statistics.txt +++ b/current_data_statistics.txt @@ -1,37 +1,36 @@ - ... parsing done. found: -1,358 polygons from -450 timezones with +1,287 polygons from +445 timezones with 729 holes -152,458 maximal amount of coordinates in one polygon -21,494 maximal amount of coordinates in a hole polygon -13,361,022 floats in all the polygons (2 per point) -updating the zone names in /Users/jcm/github/timezonefinder/scripts/timezone_names.json now. -writing json to /Users/jcm/github/timezonefinder/scripts/timezone_names.json +152,210 maximal amount of coordinates in one polygon +21,495 maximal amount of coordinates in a hole polygon +13,557,486 floats in all the polygons (2 per point) +updating the zone names in /Users/jcm/github/timezonefinder/timezonefinder/timezone_names.json now. +writing json to /Users/jcm/github/timezonefinder/timezonefinder/timezone_names.json ...Done. Computing where zones start and end... ...Done. -writing /Users/jcm/github/timezonefinder/scripts/poly_nr2zone_id.bin -writing /Users/jcm/github/timezonefinder/scripts/poly_zone_ids.bin -writing /Users/jcm/github/timezonefinder/scripts/poly_bounds.bin -writing /Users/jcm/github/timezonefinder/scripts/poly_data.bin -writing /Users/jcm/github/timezonefinder/scripts/poly_coord_amount.bin -writing /Users/jcm/github/timezonefinder/scripts/poly_adr2data.bin -writing /Users/jcm/github/timezonefinder/scripts/hole_coord_amount.bin -writing /Users/jcm/github/timezonefinder/scripts/poly_adr2data.bin -writing /Users/jcm/github/timezonefinder/scripts/hole_adr2data.bin -writing /Users/jcm/github/timezonefinder/scripts/hole_data.bin +writing /Users/jcm/github/timezonefinder/timezonefinder/poly_nr2zone_id.bin +writing /Users/jcm/github/timezonefinder/timezonefinder/poly_zone_ids.bin +writing /Users/jcm/github/timezonefinder/timezonefinder/poly_bounds.bin +writing /Users/jcm/github/timezonefinder/timezonefinder/poly_data.bin +writing /Users/jcm/github/timezonefinder/timezonefinder/poly_coord_amount.bin +writing /Users/jcm/github/timezonefinder/timezonefinder/poly_adr2data.bin +writing /Users/jcm/github/timezonefinder/timezonefinder/hole_coord_amount.bin +writing /Users/jcm/github/timezonefinder/timezonefinder/poly_adr2data.bin +writing /Users/jcm/github/timezonefinder/timezonefinder/hole_adr2data.bin +writing /Users/jcm/github/timezonefinder/timezonefinder/hole_data.bin -function compile_polygon_binaries(...) executed in 21.0s +function compile_polygon_binaries(...) executed in 21.3s compiling hex candidates for resolution 3. compiling hex candidates for resolution 2. compiling hex candidates for resolution 1. compiling hex candidates for resolution 0. reached desired resolution 3. storing mapping to timezone polygons for every hexagon candidate at this resolution (-> 'full coverage') -41,162 processed 0 remaining +41,162 processed31,163 r0 remainingggngg shortcut statistics: @@ -40,13 +39,13 @@ highest amount in one shortcut is 59 0.0 % of all shortcuts are empty frequencies of entry amounts: 0: 0 -1: 30674 -2: 8773 -3: 1402 -4: 229 -5: 39 +1: 30677 +2: 8776 +3: 1405 +4: 227 +5: 37 6: 15 -7: 12 +7: 9 8: 5 9: 5 10: 1 @@ -62,14 +61,14 @@ frequencies of entry amounts: 20: 0 21: 0 22: 0 -23: 1 +23: 0 24: 0 25: 1 26: 0 27: 0 28: 0 29: 0 -30: 1 +30: 0 31: 0 32: 1 33: 0 @@ -100,9 +99,9 @@ frequencies of entry amounts: 58: 0 59: 1 relative accumulated frequencies [%]: -[0.0, 74.52, 95.83, 99.24, 99.8, 99.89, 99.93, 99.96, 99.97, 99.98, 99.98, 99.98, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0] +[0.0, 74.53, 95.85, 99.26, 99.81, 99.9, 99.94, 99.96, 99.97, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0] missing relative accumulated frequencies [%]: -[100.0, 25.48, 4.17, 0.76, 0.2, 0.11, 0.07, 0.04, 0.03, 0.02, 0.02, 0.02, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] +[100.0, 25.47, 4.15, 0.74, 0.19, 0.1, 0.06, 0.04, 0.03, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] -------------------------------- amount of different timezones per shortcut @@ -110,10 +109,10 @@ highest amount in one shortcut is 25 0.0 % of all shortcuts are empty frequencies of entry amounts: 0: 0 -1: 30680 -2: 9004 -3: 1296 -4: 160 +1: 30683 +2: 9015 +3: 1291 +4: 151 5: 17 6: 3 7: 1 @@ -136,22 +135,17 @@ frequencies of entry amounts: 24: 0 25: 1 relative accumulated frequencies [%]: -[0.0, 74.53, 96.41, 99.56, 99.95, 99.99, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0] +[0.0, 74.54, 96.44, 99.58, 99.95, 99.99, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0] missing relative accumulated frequencies [%]: -[100.0, 25.47, 3.59, 0.44, 0.05, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] +[100.0, 25.46, 3.56, 0.42, 0.05, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] -------------------------------- validating shortcut mapping validating shortcut completeness... -validating polygon 1357 -function validate_shortcut_mapping(...) executed in 11.0s - -function compile_shortcut_mapping(...) executed in 1193.6s -the polygon data makes up 95.65% of the data -the shortcuts make up 1.05% of the data -holes make up 3.30% of the data - - -finished parsing timezonefinder data to /Users/jcm/github/timezonefinder/scripts +validating polygon 1286 +function validate_shortcut_mapping(...) executed in 175.3s -function parse_data(...) executed in 1220.8s +function compile_shortcut_mapping(...) executed in 1940.9s +the polygon data makes up 95.68% of the data +the shortcuts make up 1.03% of the data +holes make up 3.28% of the data diff --git a/pyproject.toml b/pyproject.toml index 36415a2..7910b29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "timezonefinder" -version = "6.1.8" +version = "6.1.9" description = "fast python package for finding the timezone of any point on earth (coordinates) offline" authors = ["jannikmi "] license = "MIT" diff --git a/scripts/file_converter.py b/scripts/file_converter.py index a6ead23..7ed70a3 100644 --- a/scripts/file_converter.py +++ b/scripts/file_converter.py @@ -582,6 +582,7 @@ def compile_shortcut_mapping(output_path: Path) -> int: cf. https://eng.uber.com/h3/ """ + print("\n\ncomputing timezone polygon index ('shortcuts')...") candidates = all_res_candidates(SHORTCUT_H3_RES) print( f"reached desired resolution {SHORTCUT_H3_RES}.\n" diff --git a/timezonefinder/hole_adr2data.bin b/timezonefinder/hole_adr2data.bin index f09fc48..20a685e 100644 Binary files a/timezonefinder/hole_adr2data.bin and b/timezonefinder/hole_adr2data.bin differ diff --git a/timezonefinder/hole_coord_amount.bin b/timezonefinder/hole_coord_amount.bin index 48fa4e5..361af79 100644 Binary files a/timezonefinder/hole_coord_amount.bin and b/timezonefinder/hole_coord_amount.bin differ diff --git a/timezonefinder/hole_data.bin b/timezonefinder/hole_data.bin index 689e70b..60778f5 100644 Binary files a/timezonefinder/hole_data.bin and b/timezonefinder/hole_data.bin differ diff --git a/timezonefinder/hole_registry.json b/timezonefinder/hole_registry.json index 50b0a7f..511f82e 100644 --- a/timezonefinder/hole_registry.json +++ b/timezonefinder/hole_registry.json @@ -1,225 +1,225 @@ { - "1129": [ + "1128": [ 2, 239 ], - "1150": [ - 16, + "1149": [ + 15, 241 ], - "1155": [ + "1154": [ 44, - 257 + 256 ], - "1156": [ + "1155": [ 2, - 301 + 300 ], - "1157": [ + "1156": [ 37, - 303 + 302 ], - "1158": [ + "1157": [ 20, - 340 + 339 ], - "1161": [ + "1160": [ 1, - 360 + 359 ], - "1164": [ + "1163": [ 28, - 361 + 360 ], - "1165": [ + "1164": [ 3, - 389 + 388 ], - "1169": [ + "1168": [ 1, - 392 + 391 ], - "1170": [ + "1169": [ 35, - 393 + 392 ], - "1171": [ + "1170": [ 4, - 428 + 427 ], "1175": [ 6, - 432 + 431 ], "1176": [ 2, - 438 + 437 ], "1179": [ 1, - 440 + 439 ], "1180": [ 2, - 441 + 440 ], "1181": [ 5, - 443 + 442 ], "1182": [ 3, - 448 + 447 ], "1183": [ 14, - 451 + 450 ], "1188": [ 12, - 465 + 464 ], "1189": [ 2, - 477 + 476 ], "1192": [ 1, - 479 + 478 ], "1197": [ 1, - 480 + 479 ], "1198": [ 7, - 481 + 480 ], "1203": [ 3, - 488 + 487 ], "1208": [ 21, - 491 + 490 ], "1219": [ 1, - 512 + 511 ], "1223": [ 1, - 513 + 512 ], "1226": [ 2, - 514 + 513 ], "1234": [ 5, - 516 + 515 ], "1236": [ 2, - 521 + 520 ], "1239": [ 2, - 523 + 522 ], "1240": [ 4, - 525 + 524 ], "1242": [ 13, - 529 + 528 ], "1244": [ 13, - 542 + 541 ], "1247": [ 2, - 555 + 554 ], "1249": [ 1, - 557 + 556 ], "1250": [ 11, - 558 + 557 ], - "1256": [ + "1254": [ 2, - 569 + 568 ], - "1261": [ + "1258": [ 13, - 571 + 570 ], - "1262": [ + "1259": [ 1, - 584 + 583 ], - "1263": [ + "1260": [ 4, - 585 + 584 ], - "1266": [ + "1263": [ 6, - 589 + 588 ], - "1267": [ + "1264": [ 2, - 595 + 594 ], - "1273": [ + "1270": [ 5, - 597 + 596 ], - "1276": [ + "1273": [ 4, - 602 + 601 ], - "1279": [ + "1276": [ 31, - 606 + 605 ], - "1284": [ + "1279": [ 34, - 637 + 636 ], - "1288": [ - 36, - 671 + "1283": [ + 37, + 670 ], - "1289": [ + "1284": [ 1, 707 ], - "1290": [ - 22, + "1285": [ + 21, 708 ], "16": [ 8, 1 ], - "198": [ + "199": [ 92, 23 ], - "237": [ + "239": [ 1, 115 ], - "247": [ + "249": [ 2, 116 ], - "266": [ + "268": [ 1, 118 ], @@ -227,19 +227,19 @@ 1, 9 ], - "322": [ + "323": [ 1, 119 ], - "346": [ + "345": [ 1, 120 ], - "348": [ + "347": [ 2, 121 ], - "358": [ + "357": [ 1, 123 ], @@ -247,11 +247,11 @@ 1, 10 ], - "371": [ + "370": [ 1, 124 ], - "388": [ + "387": [ 1, 125 ], @@ -259,35 +259,35 @@ 1, 0 ], - "438": [ + "437": [ 1, 126 ], - "441": [ + "440": [ 6, 127 ], - "455": [ + "454": [ 1, 133 ], - "496": [ + "495": [ 16, 134 ], - "508": [ + "507": [ 2, 150 ], - "525": [ + "524": [ 1, 152 ], - "532": [ + "531": [ 1, 153 ], - "535": [ + "534": [ 6, 154 ], @@ -295,83 +295,83 @@ 2, 11 ], - "542": [ + "541": [ 2, 160 ], - "571": [ + "570": [ 22, 162 ], - "604": [ + "603": [ 2, 184 ], - "653": [ + "652": [ 5, 186 ], - "730": [ + "729": [ 21, 191 ], - "769": [ + "768": [ 1, 212 ], - "770": [ + "769": [ 1, 213 ], - "778": [ + "777": [ 6, 214 ], - "779": [ + "778": [ 1, 220 ], - "785": [ + "784": [ 6, 221 ], - "819": [ + "818": [ 2, 227 ], - "831": [ + "830": [ 1, 229 ], - "834": [ + "833": [ 1, 230 ], - "836": [ + "835": [ 1, 231 ], - "844": [ + "843": [ 1, 232 ], - "853": [ + "852": [ 2, 233 ], - "857": [ + "856": [ 1, 235 ], - "861": [ + "860": [ 1, 236 ], - "87": [ + "88": [ 10, 13 ], - "881": [ + "880": [ 2, 237 ] diff --git a/timezonefinder/poly_adr2data.bin b/timezonefinder/poly_adr2data.bin index a06efb3..fc26979 100644 Binary files a/timezonefinder/poly_adr2data.bin and b/timezonefinder/poly_adr2data.bin differ diff --git a/timezonefinder/poly_bounds.bin b/timezonefinder/poly_bounds.bin index a3df529..266352f 100644 Binary files a/timezonefinder/poly_bounds.bin and b/timezonefinder/poly_bounds.bin differ diff --git a/timezonefinder/poly_coord_amount.bin b/timezonefinder/poly_coord_amount.bin index c44d514..bfdf637 100644 Binary files a/timezonefinder/poly_coord_amount.bin and b/timezonefinder/poly_coord_amount.bin differ diff --git a/timezonefinder/poly_data.bin b/timezonefinder/poly_data.bin index f57f881..a5371da 100644 Binary files a/timezonefinder/poly_data.bin and b/timezonefinder/poly_data.bin differ diff --git a/timezonefinder/poly_nr2zone_id.bin b/timezonefinder/poly_nr2zone_id.bin index 4f1a066..497eed5 100644 Binary files a/timezonefinder/poly_nr2zone_id.bin and b/timezonefinder/poly_nr2zone_id.bin differ diff --git a/timezonefinder/poly_zone_ids.bin b/timezonefinder/poly_zone_ids.bin index 5b06168..78c633f 100644 Binary files a/timezonefinder/poly_zone_ids.bin and b/timezonefinder/poly_zone_ids.bin differ diff --git a/timezonefinder/shortcuts.bin b/timezonefinder/shortcuts.bin index 4ca8ff8..5be7f7a 100644 Binary files a/timezonefinder/shortcuts.bin and b/timezonefinder/shortcuts.bin differ diff --git a/timezonefinder/timezone_names.json b/timezonefinder/timezone_names.json index 5606560..de65b19 100644 --- a/timezonefinder/timezone_names.json +++ b/timezonefinder/timezone_names.json @@ -88,6 +88,7 @@ "America/Cayman", "America/Chicago", "America/Chihuahua", + "America/Ciudad_Juarez", "America/Costa_Rica", "America/Creston", "America/Cuiaba", @@ -159,7 +160,6 @@ "America/Nuuk", "America/Ojinaga", "America/Panama", - "America/Pangnirtung", "America/Paramaribo", "America/Phoenix", "America/Port-au-Prince", @@ -268,8 +268,8 @@ "Asia/Qostanay", "Asia/Qyzylorda", "Asia/Riyadh", - "Asia/Samarkand", "Asia/Sakhalin", + "Asia/Samarkand", "Asia/Seoul", "Asia/Shanghai", "Asia/Singapore",