Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdferris committed Dec 30, 2014
1 parent e6a57a7 commit 9f9eb13
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kmlparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,20 @@ def ConvertPlacemarkToShape(self, p, feed):

try:
existing_shape = feed.GetShape(p.name)

# If the existing shape has the same points, we don't need to add a new
# shape.
if existing_shape == shape:
return

# If the shape has different points, we need to modify our shape id so as
# to avoid duplication.
shape.shape_id += '_%d' % len(feed.GetShapeList())

except KeyError:
# No existing shape with that id, so no worries.
pass

feed.AddShapeObject(shape)

def main():
Expand Down

0 comments on commit 9f9eb13

Please sign in to comment.