Fixed bug

This commit is contained in:
TheDevKiller 2018-11-11 17:36:24 +01:00
parent 2e56afcde8
commit 0a19fe9c6e
2 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@ -80,3 +80,4 @@ Session.vim
.netrwhist
*~
_map.html

View File

@ -31,9 +31,9 @@ def runfetch(url='https://www.legifrance.gouv.fr/eli/arrete/2018/10/12/PRMD18245
def dms2dd(dms):
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
if coordslst[3] in ["N", "E"]:
if coordslst[3] in ["n", "e"]:
return dd
elif coordslst[3] in ["S", "O"]:
if coordslst[3] in ["s", "o"]:
return -dd
@ -91,7 +91,7 @@ def fetch(url='https://www.legifrance.gouv.fr/eli/arrete/2018/10/12/PRMD1824595A
del lst
# Atolls
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