Пример #1
0
    def test_write_map_labels(self):
        d = Domain(4326, "-te 25 70 35 72 -ts 500 500")
        tmpfilename = os.path.join(ntd.tmp_data_path, "domain_write_map_labels.png")
        d.write_map(tmpfilename, merLabels=[False, False, False, True], parLabels=[True, False, False, False])

        self.assertTrue(os.path.exists(tmpfilename))
        i = Image.open(tmpfilename)
        i.verify()
Пример #2
0
 def test_write_map(self):
     d = Domain(4326, "-te 25 70 35 72 -ts 500 500")
     tmpfilename = os.path.join(ntd.tmp_data_path, 'domain_write_map.png')
     d.write_map(tmpfilename)
     self.assertTrue(os.path.exists(tmpfilename))
     i = Image.open(tmpfilename)
     i.verify()
     self.assertEqual(i.info['dpi'], (50, 50))
Пример #3
0
    def test_write_map_dpi100(self):
        d = Domain(4326, "-te 25 70 35 72 -ts 500 500")
        tmpfilename = os.path.join(ntd.tmp_data_path, "domain_write_map_dpi100.png")
        d.write_map(tmpfilename, dpi=100)

        self.assertTrue(os.path.exists(tmpfilename))
        i = Image.open(tmpfilename)
        i.verify()
        self.assertEqual(i.info["dpi"], (100, 100))
Пример #4
0
 def test_write_map_labels(self):
     d = Domain(4326, "-te 25 70 35 72 -ts 500 500")
     tmpfilename = os.path.join(ntd.tmp_data_path,
                                'domain_write_map_labels.png')
     d.write_map(tmpfilename,
                 merLabels=[False, False, False, True],
                 parLabels=[True, False, False, False])
     self.assertTrue(os.path.exists(tmpfilename))
     i = Image.open(tmpfilename)
     i.verify()