Skip to content

Commit

Permalink
replaced system with subprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPlayer3 committed Feb 29, 2024
1 parent 47ead4d commit d762ba9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/asf_tools/watermasking/fill_missing_tiles.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import argparse
import os
import subprocess

import numpy as np
from osgeo import gdal, osr
Expand Down Expand Up @@ -65,8 +66,8 @@ def main():
dst_band.WriteArray(data)
del dst_ds

command = f'gdal_translate -of COG -co NUM_THREADS=all_cpus {tile_tif} {tile_cog}'
os.system(command)
command = f'gdal_translate -of COG -co NUM_THREADS=all_cpus {tile_tif} {tile_cog}'.split(' ')
subprocess.run(command)
os.remove(tile_tif)


Expand Down

0 comments on commit d762ba9

Please sign in to comment.