From: Michael Orlitzky Date: Sat, 13 Feb 2010 05:41:01 +0000 (-0500) Subject: Added a Coordinates class, and updated the LineString class to refer to Coordinates... X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fcensus-tools.git;a=commitdiff_plain;h=a5341c314815ed4df97e2b0f94d05322660052cf Added a Coordinates class, and updated the LineString class to refer to Coordinates.OPEN_TAG and CLOSE_TAG. --- diff --git a/src/KML.py b/src/KML.py index 26e8e71..9b589ad 100644 --- a/src/KML.py +++ b/src/KML.py @@ -110,6 +110,12 @@ class Description(KmlObject): +class Coordinates(KmlObject): + + OPEN_TAG = '' + CLOSE_TAG = '' + + class LineString(KmlObject): OPEN_TAG = '' @@ -140,9 +146,9 @@ class LineString(KmlObject): coords = [] for ls in linestrings: - c_tag_start = ls.find('') - c_start = c_tag_start + len('') - c_end = ls.find('') + c_tag_start = ls.find(Coordinates.OPEN_TAG) + c_start = c_tag_start + len(Coordinates.OPEN_TAG) + c_end = ls.find(Coordinates.CLOSE_TAG) c = ls[ c_start : c_end ] coords.append(c)