From 195463b144df03b182a99a7f7c19b1dad5e96222 Mon Sep 17 00:00:00 2001 From: nifg414 <112945131+nifg414@users.noreply.github.com> Date: Thu, 11 Jan 2024 14:38:08 +0100 Subject: [PATCH] remove metadata from download when using scenes option --- src/imagery/i.asf.download/i.asf.download.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/imagery/i.asf.download/i.asf.download.py b/src/imagery/i.asf.download/i.asf.download.py index 9de3c597..b41bbb70 100644 --- a/src/imagery/i.asf.download/i.asf.download.py +++ b/src/imagery/i.asf.download/i.asf.download.py @@ -436,6 +436,10 @@ def main(): else: scenes = options["scenes"].split(",") results = asf.granule_search(scenes) + # Remove metadata from download + for file in results: + if file.properties['fileName'].endswith('iso.xml') and file.properties['processingLevel'] == 'METADATA_GRD_HD': + results.remove(file) else: results = asf.geo_search(**opts) checkout_results(results)