コード例 #1
0
ファイル: kml.py プロジェクト: paleolimbot/pyny-geo
 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)
コード例 #2
0
ファイル: kml.py プロジェクト: paleolimbot/pyny-geo
 def write(self, fileobj, ind):
     if self.value is not None:
         writesimple(fileobj, ind, self.tag, self.value, self.attrs)
     else:
         indent(fileobj, ind)
         opentag(fileobj, self.tag, self.attrs)
         for key, value in self.childtags.items():
             writesimple(fileobj, ind + 1, key, value)
         self._writeContents(fileobj, ind + 1)
         for childobj in self.childobjs:
             childobj.write(fileobj, ind + 1)
         indent(fileobj, ind)
         closetag(fileobj, self.tag)