Skip to content

Commit

Permalink
fix: close KML polygons
Browse files Browse the repository at this point in the history
  • Loading branch information
javisantana committed Aug 23, 2013
1 parent f5817cf commit 20eb3fd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/application/kml.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ def path_to_kml(paths):
kml+="<coordinates>"
for p in paths[0]:
kml+= str(p[1]) + "," + str(p[0]) + ",0\n"
# close polygon
p = paths[0][0]
kml += str(p[1]) + "," + str(p[0]) + ",0\n"
kml += "</coordinates>"
kml+= "</LinearRing>"
kml+= "</outerBoundaryIs>"
Expand All @@ -16,6 +19,9 @@ def path_to_kml(paths):
kml+="<coordinates>"
for p in inner:
kml+= str(p[1]) + "," + str(p[0]) + ",0\n"
# close polygon
p = inner[0][0]
kml += str(p[1]) + "," + str(p[0]) + ",0\n"
kml += "</coordinates>"
kml+= "</LinearRing>"
kml +="</innerBoundaryIs>"
Expand Down

0 comments on commit 20eb3fd

Please # to comment.