Added Mururoa and Fangataufa atolls
This commit is contained in:
parent
13cb883085
commit
5d867ac85e
12
fetch.py
12
fetch.py
@ -36,7 +36,7 @@ if __name__ == '__main__':
|
|||||||
area["zone"] = area["zone"].lower()
|
area["zone"] = area["zone"].lower()
|
||||||
if "polygones" in area["zone"]:
|
if "polygones" in area["zone"]:
|
||||||
lst = []
|
lst = []
|
||||||
tmp = re.compile("zone . : .*").split(area["zone"])
|
tmp = re.compile("zone . : .*").split(area["zone"]) # List of polygons
|
||||||
for polygon in tmp:
|
for polygon in tmp:
|
||||||
lst.append(re.findall(".{0,35} ?:? ?.? ?: ?(\d{1,3}° \d{2}' \d{2},?\d{0,2}(?:\"|”) .) ?\/ ?(\d{1,3}° \d{2}' \d{2},?\d{0,2}(?:\"|”) .)", area["zone"]))
|
lst.append(re.findall(".{0,35} ?:? ?.? ?: ?(\d{1,3}° \d{2}' \d{2},?\d{0,2}(?:\"|”) .) ?\/ ?(\d{1,3}° \d{2}' \d{2},?\d{0,2}(?:\"|”) .)", area["zone"]))
|
||||||
area["zone"] = lst
|
area["zone"] = lst
|
||||||
@ -54,11 +54,15 @@ if __name__ == '__main__':
|
|||||||
lst[0] = re.search(r"(.{6}) .{0,5}?(\d{1,3},?\d{0,2} ?.{1,2}) .{1,35} ?(\d{3}° \d{1,2}' \d{1,2}” .) ?\/ ?(\d{1,3}° \d{1,2}' \d{1,2}” .)", area["zone"], re.S).groups()
|
lst[0] = re.search(r"(.{6}) .{0,5}?(\d{1,3},?\d{0,2} ?.{1,2}) .{1,35} ?(\d{3}° \d{1,2}' \d{1,2}” .) ?\/ ?(\d{1,3}° \d{1,2}' \d{1,2}” .)", area["zone"], re.S).groups()
|
||||||
area["zone"] = lst
|
area["zone"] = lst
|
||||||
del lst
|
del lst
|
||||||
|
# Atolls
|
||||||
|
elif area["zone"].strip() == "atolls et eaux territoriales incluses":
|
||||||
|
area["zone"] = [("cercle", "35KM", "138° 54' 8,01\"", "21° 49' 44,64\""), ("cercle", "27KM", "138° 44' 33.01\"", "22° 14' 7.38\"")]
|
||||||
|
|
||||||
# Print the dict (keep this code in the end of the file)
|
# Print the dict (keep this code in the end of the file)
|
||||||
print("===== Dict =====")
|
print("===== Dict =====")
|
||||||
for index, area in enumerate(diclist):
|
for index, area in enumerate(diclist):
|
||||||
print(f"\n-------------{index}----------------\n")
|
if index == 277:
|
||||||
for element in area:
|
print(f"\n-------------{index}----------------\n")
|
||||||
print(f" {element}: {diclist[index][element]}")
|
for element in area:
|
||||||
|
print(f" {element}: {diclist[index][element]}")
|
||||||
print("\n")
|
print("\n")
|
Loading…
Reference in New Issue
Block a user