Private
Public Access
1
0

more autopep

This commit is contained in:
Sander Roosendaal
2022-03-10 17:16:31 +01:00
parent 8070a68931
commit a0223bec24
5 changed files with 32 additions and 60 deletions

View File

@@ -25,7 +25,7 @@ from django.conf import settings
import geocoder
from matplotlib import path
# from matplotlib import path
import xml.etree.ElementTree as et
from xml.etree.ElementTree import Element, SubElement, Comment, tostring
@@ -42,10 +42,6 @@ def howfaris(lat_lon, course):
return distance
#whatisnear = 150
# get nearest races
def getnearestraces(lat_lon, races, whatisnear=150):
newlist = []
@@ -55,7 +51,6 @@ def getnearestraces(lat_lon, races, whatisnear=150):
newlist.append(race)
else:
c = race.course
coords = c.coord
distance = howfaris(lat_lon, c)
if distance < whatisnear:
newlist.append(race)
@@ -84,7 +79,6 @@ def getnearestcourses(lat_lon, courses, whatisnear=150, strict=False):
newlist = []
counter = 0
for c in courses:
coords = c.coord
distance = howfaris(lat_lon, c)
if distance < whatisnear:
@@ -199,8 +193,6 @@ def coursetokml(course):
polygons = GeoPolygon.objects.filter(
course=course).order_by("order_in_course")
polygonsxml = []
for polygon in polygons:
placemark = SubElement(folder2, 'Placemark')
polygonname = SubElement(placemark, 'name')