Skip to content

Commit

Permalink
add 6th mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
bordoray committed Sep 8, 2023
1 parent 51f6fa6 commit 7d54118
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_get_mesh(self):
# メッシュコードの割り振り規則は後述
self.assertEqual(mesh["code"], "3022")

# 1次メッシュのメッシュコード
# mesh 1st: 1次メッシュのメッシュコード
self.assertEqual(get_mesh(1, 0, 0)["code"], "3022")
self.assertEqual(get_mesh(1, 1, 0)["code"], "3023")
self.assertEqual(get_mesh(1, 0, 1)["code"], "3122")
Expand All @@ -44,7 +44,7 @@ def test_get_mesh(self):
self.assertEqual(get_mesh(1, 20, 36)["code"], "6642") # 士別
self.assertEqual(get_mesh(1, 23, 34)["code"], "6445") # 根室

# 2次メッシュ
# mesh 2nd: 2次メッシュ
self.assertEqual(get_mesh(2, 0, 0)["code"], "302200")
self.assertEqual(get_mesh(2, 1, 0)["code"], "302201")
self.assertEqual(get_mesh(2, 0, 1)["code"], "302210")
Expand All @@ -67,7 +67,7 @@ def test_get_mesh(self):
self.assertEqual(get_mesh(2, 163, 290)["code"], "664223") # 士別
self.assertEqual(get_mesh(2, 186, 277)["code"], "644552") # 根室

# 3次メッシュ
# mesh 3rd : 3次メッシュ
self.assertEqual(get_mesh(3, 0, 0)["code"], "30220000")
self.assertEqual(get_mesh(3, 1, 1)["code"], "30220011")
self.assertEqual(get_mesh(3, 9, 9)["code"], "30220099")
Expand All @@ -86,7 +86,7 @@ def test_get_mesh(self):
self.assertEqual(get_mesh(3, 1635, 2904)["code"], "66422345") # 士別
self.assertEqual(get_mesh(3, 1864, 2776)["code"], "64455264") # 根室

# 4分割地域メッシュ
# mesh 4th: 2分の1地域メッシュ
self.assertEqual(get_mesh(4, 0, 0)["code"], "302200001")
self.assertEqual(get_mesh(4, 1, 0)["code"], "302200002")
self.assertEqual(get_mesh(4, 0, 1)["code"], "302200003")
Expand All @@ -104,7 +104,7 @@ def test_get_mesh(self):
self.assertEqual(get_mesh(4, 3270, 5808)["code"], "664223451") # 士別
self.assertEqual(get_mesh(4, 3729, 5552)["code"], "644552642") # 根室

# 5分割地域メッシュ
# mesh 5th : 4分の1地域メッシュ
self.assertEqual(get_mesh(5, 703, 2103)["code"], "3624415544") # 石垣
self.assertEqual(get_mesh(5, 2428, 4051)["code"], "4229542733") # 奄美
self.assertEqual(get_mesh(5, 2779, 6136)["code"], "4930154422") # 熊本
Expand All @@ -117,6 +117,19 @@ def test_get_mesh(self):
self.assertEqual(get_mesh(5, 7458, 11105)["code"], "6445526423") # 根室
self.assertEqual(get_mesh(5, 3952, 6966)["code"], "5134621831") # 小豆島

# mesh 6th : 8分の1地域メッシュ
self.assertEqual(get_mesh(6, 1407, 4206)["code"], "36244155442") # 石垣
self.assertEqual(get_mesh(6, 4857, 8103)["code"], "42295427334") # 奄美
self.assertEqual(get_mesh(6, 5558, 12273)["code"], "49301544223") # 熊本
self.assertEqual(get_mesh(6, 11400, 15001)["code"], "53393655113") # 東京
self.assertEqual(get_mesh(6, 12890, 6496)["code"], "40421121121") # 父島
self.assertEqual(get_mesh(6, 11573, 15778)["code"], "54405026232") # 益子
self.assertEqual(get_mesh(6, 12066, 17302)["code"], "57400628341") # 仙台
self.assertEqual(get_mesh(6, 12461, 19742)["code"], "60416377432") # 八戸
self.assertEqual(get_mesh(6, 13083, 23233)["code"], "66422345124") # 士別
self.assertEqual(get_mesh(6, 14917, 22210)["code"], "64455264232") # 根室
self.assertEqual(get_mesh(6, 7904, 13932)["code"], "51346218311") # 小豆島

# 7~:その他メッシュ
self.assertEqual(get_mesh(7, 0, 0)["code"], "3022000000")
self.assertEqual(get_mesh(7, 0, 1)["code"], "3022000010")
Expand Down

0 comments on commit 7d54118

Please sign in to comment.