Private
Public Access
1
0

Merge tag 'v6.59' into develop

hotfix KML processing
This commit is contained in:
Sander Roosendaal
2018-05-07 22:01:03 +02:00
2 changed files with 9 additions and 3 deletions

View File

@@ -108,7 +108,7 @@ def crewnerdcourse(doc):
description = course.findall('.//opengis:description',ns)[0].text
except IndexError:
description = ''
polygonpms = course.findall('.//opengis:Placemark[opengis:Polygon]',ns)
polygons = get_polygons(polygonpms)
@@ -151,7 +151,11 @@ def get_polygons(polygonpms):
def kmltocourse(f):
doc = et.parse(f)
courses = doc.findall('.//opengis:Folder[opengis:Placemark]',ns)
if not courses:
courses = doc.findall('.//opengis:Placemark',ns)
if courses:
return crewnerdcourse(courses)

View File

@@ -123,11 +123,13 @@
<p>
<ul>
<li>Open Google Earth</li>
<li>Create a folder "Courses" under "Temporary Places" or under "My Places"</li>
<li>Create a folder for each Course under "Courses", and for each course:</li>
<li>Create Start polygon</li>
<li>Optional: Create First "must row through" polygon</li>
<li>Optional: Create subsequent "must row through" polygons</li>
<li>Create Finish polygon</li>
<li>Save Place as KML file</li>
<li>Save "Courses" as KML file</li>
<li>Upload the file to rowsandall.com using the "Add Courses" button</li>
</ul>
</p>