From 7dcf2029cc220738b2df1bce3cac1ad76a11bc02 Mon Sep 17 00:00:00 2001 From: Vishal Gaur <34275219+SwordSaintLancelot@users.noreply.github.com> Date: Thu, 18 Jul 2024 20:29:55 -0500 Subject: [PATCH] merging multiple variables to shorten the code Co-authored-by: Chuck Daniels --- hls_vi/generate_stac_items.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hls_vi/generate_stac_items.py b/hls_vi/generate_stac_items.py index 2600d90..322d724 100644 --- a/hls_vi/generate_stac_items.py +++ b/hls_vi/generate_stac_items.py @@ -207,10 +207,8 @@ def process_projection(item, granule, band1_file): proj_ext.shape = [height, width] for attribute in granule.AdditionalAttributes.AdditionalAttribute: if attribute.Name == "MGRS_TILE_ID": - value = attribute.Values.Value.cdata - hemi = "326" - epsg = int(hemi + value[0:2]) - proj_ext.epsg = epsg + mgrs_tile_id = attribute.Values.Value.cdata + proj_ext.epsg = int(f"326{mgrs_tile_id[:2]}") def process_view_geometry(item, granule):