Skip to content

Commit

Permalink
merging multiple variables to shorten the code
Browse files Browse the repository at this point in the history
Co-authored-by: Chuck Daniels <[email protected]>
  • Loading branch information
SwordSaintLancelot and chuckwondo authored Jul 19, 2024
1 parent b9461f5 commit 7dcf202
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions hls_vi/generate_stac_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7dcf202

Please sign in to comment.