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))
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))