Exemplo n.º 1
0
 def _writeContents(self, fileobj, ind):
     indent(fileobj, ind)
     opentag(fileobj, self.TAG_LINEARRING)
     pointseriesout = PointSeries(self.pointseries)
     pointseriesout.append(self.pointseries[0])
     writesimple(fileobj, ind + 1, TAG_COORDINATES, _gencoords(*pointseriesout))
     indent(fileobj, ind)
     closetag(fileobj, self.TAG_LINEARRING)
Exemplo n.º 2
0
def _parsecoords(coordsString):
    series = PointSeries()
    for coordString in re.split(r"\s", coordsString.strip()):
        coords = coordString.split(",")
        series.append((float(coords[0]), float(coords[1])))
    return series