def test_write_collection_points(self): mp = Multipoint([p.vertex for p in self.points]) mp0 = copy(mp) mp1 = copy(mp.shift((4, 2))) mp2 = copy(mp.shift((-2, 3))) shp.write_shapefile([mp0, mp1, mp2], "data/points_collection") return
def test_write_collection_lines(self): line0 = copy(self.line) line1 = copy(self.line.shift((4, 2))) line2 = copy(self.line.shift((-2, 3))) shp.write_shapefile(os.path.join(TESTDIR, "data/line_collection.shp"), line0, line1, line2) for fnm in ("line_collection.shx", "line_collection.shx", "line_collection.dbf", "line_collection.prj"): self.assertTrue(os.path.isfile(os.path.join(TESTDIR, "data", fnm)))
def test_write_collection_multipoint(self): mp = Multipoint(self.points) mp0 = copy(mp) mp1 = copy(mp.shift((4, 2))) mp2 = copy(mp.shift((-2, 3))) shp.write_shapefile(os.path.join(TESTDIR, "data/mp_collection.shp"), mp0, mp1, mp2) for fnm in ("mp_collection.shx", "mp_collection.shx", "mp_collection.dbf", "mp_collection.prj"): self.assertTrue(os.path.isfile(os.path.join(TESTDIR, "data", fnm)))
def test_write_collection_multipoint(self): mp = Multipoint([p.vertex for p in self.points]) mp0 = copy(mp) mp1 = copy(mp.shift((4, 2))) mp2 = copy(mp.shift((-2, 3))) shp.write_shapefile(os.path.join(TESTDIR, "data/mp_collection.shp"), mp0, mp1, mp2) for fnm in ("mp_collection.shx", "mp_collection.shx", "mp_collection.dbf", "mp_collection.prj"): self.assertTrue(os.path.isfile(os.path.join(TESTDIR, "data", fnm)))
def test_writepoints(self): points = self.points shp.write_shapefile(os.path.join(TESTDIR, "data/points.shp"), *points) for fnm in ("points.shx", "points.shx", "points.dbf", "points.prj"): self.assertTrue(os.path.isfile(os.path.join(TESTDIR, "data", fnm))) return
def test_write_collection_lines(self): line0 = copy(self.line) line1 = copy(self.line.shift((4, 2))) line2 = copy(self.line.shift((-2, 3))) shp.write_shapefile([line0, line1, line2], "data/line_collection") return
def test_write_points(self): points = self.points shp.write_shapefile(os.path.join(TESTDIR, "data/points.shp"), *points) for fnm in ("points.shx", "points.shx", "points.dbf", "points.prj"): self.assertTrue(os.path.isfile(os.path.join(TESTDIR, "data", fnm)))