Fixed bug
This commit is contained in:
parent
2e56afcde8
commit
0a19fe9c6e
1
.gitignore
vendored
1
.gitignore
vendored
@ -80,3 +80,4 @@ Session.vim
|
|||||||
.netrwhist
|
.netrwhist
|
||||||
*~
|
*~
|
||||||
|
|
||||||
|
_map.html
|
||||||
|
6
fetch.py
6
fetch.py
@ -31,9 +31,9 @@ def runfetch(url='https://www.legifrance.gouv.fr/eli/arrete/2018/10/12/PRMD18245
|
|||||||
def dms2dd(dms):
|
def dms2dd(dms):
|
||||||
coordslst = re.search("(\d{1,3})° (\d{2})(?:'|′) (\d{2}(?:,|.)?\d{0,3})(?:\"|”|\'\') ?(.)", dms).groups()
|
coordslst = re.search("(\d{1,3})° (\d{2})(?:'|′) (\d{2}(?:,|.)?\d{0,3})(?:\"|”|\'\') ?(.)", dms).groups()
|
||||||
dd = float(coordslst[0].replace(",", ".")) + float(coordslst[1].replace(",", "."))/60 + float(coordslst[2].replace(",", "."))/3600
|
dd = float(coordslst[0].replace(",", ".")) + float(coordslst[1].replace(",", "."))/60 + float(coordslst[2].replace(",", "."))/3600
|
||||||
if coordslst[3] in ["N", "E"]:
|
if coordslst[3] in ["n", "e"]:
|
||||||
return dd
|
return dd
|
||||||
elif coordslst[3] in ["S", "O"]:
|
if coordslst[3] in ["s", "o"]:
|
||||||
return -dd
|
return -dd
|
||||||
|
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ def fetch(url='https://www.legifrance.gouv.fr/eli/arrete/2018/10/12/PRMD1824595A
|
|||||||
del lst
|
del lst
|
||||||
# Atolls
|
# Atolls
|
||||||
elif area["zone"].strip() == "atolls et eaux territoriales incluses":
|
elif area["zone"].strip() == "atolls et eaux territoriales incluses":
|
||||||
area["zone"] = [("cercle", 3500.0, "138.9022", "21.82917"), ("cercle", "27KM", "138.7425", "22.23528A")]
|
area["zone"] = [("cercle", 3500.0, "138.9022", "21.82917"), ("cercle", "27KM", "138.7425", "22.23528")]
|
||||||
return diclist
|
return diclist
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user