+class Coordinates(KmlObject):
+
+ OPEN_TAG = '<coordinates>'
+ CLOSE_TAG = '</coordinates>'
+
+
class LineString(KmlObject):
OPEN_TAG = '<LineString>'
coords = []
for ls in linestrings:
- c_tag_start = ls.find('<coordinates>')
- c_start = c_tag_start + len('<coordinates>')
- c_end = ls.find('</coordinates>')
+ 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)