コード例 #1
0
 def testMultiPolygonFromJTS(self):
     mp = geom.MultiPolygon(
         self.gf.createMultiPolygon([
             self.gf.createPolygon(
                 self.gf.createLinearRing([
                     Coordinate(1, 2),
                     Coordinate(3, 4),
                     Coordinate(5, 6),
                     Coordinate(1, 2)
                 ]), [])
         ]))
     self.assertEqual('MULTIPOLYGON (((1 2, 3 4, 5 6, 1 2)))', str(mp))
コード例 #2
0
 def testMultiPolygon(self):
     mp = geom.MultiPolygon([[[1, 2], [3, 4], [5, 6], [1, 2]]])
     self.assertEqual('MULTIPOLYGON (((1 2, 3 4, 5 6, 1 2)))', str(mp))