Exemple #1
0
    def unpack(self, store, tmp):
        img = self.img_name()

        with store.upload_dir() as target:
            target_dir = os.path.join(target, self.base_dir)
            mkdir_p(target_dir)

            with tmpdir.tmpdir() as d:
                with zipfile.ZipFile(tmp.name, 'r') as zfile:
                    zfile.extract(img, d)

                output_file = os.path.join(target, self.output_file())
                mask.negative(os.path.join(d, img), "HFA", output_file)
Exemple #2
0
    def unpack(self, store, tmp):
        img = self.img_name()

        with store.upload_dir() as target:
            target_dir = os.path.join(target, self.base_dir)
            mkdir_p(target_dir)

            with tmpdir.tmpdir() as d:
                with zipfile.ZipFile(tmp.name, 'r') as zfile:
                    zfile.extract(img, d)

                output_file = os.path.join(target, self.output_file())
                mask.negative(os.path.join(d, img), "HFA", output_file)
Exemple #3
0
 def unpack(self, store, tmp):
     with store.upload_dir() as target:
         mkdir_p(os.path.join(target, self.base_dir))
         output_file = os.path.join(target, self.output_file())
         mask.negative(tmp.name, "GTiff", output_file)
Exemple #4
0
 def unpack(self, store, tmp):
     with store.upload_dir() as target:
         mkdir_p(os.path.join(target, self.base_dir))
         output_file = os.path.join(target, self.output_file())
         mask.negative(tmp.name, "GTiff", output_file)