Skip to content

Commit

Permalink
gnss.GNSS_SIDESHOW.get_site_lat_lon: dload site list file if not exist (
Browse files Browse the repository at this point in the history
#1249)

bugfix while running "view.py --gnss-source SIDESHOW --ref-gnss P225" on the first time, where the reference GNSS needs the site list file to extract its lat/lon location, but the site list file has not been downloaded yet
  • Loading branch information
yunjunz authored Aug 10, 2024
1 parent f7ac98f commit f5fc900
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mintpy/objects/gnss.py
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,8 @@ def get_site_lat_lon(self, print_msg=False) -> (float, float):
"""
# need to refer to the site list
site_list_file = os.path.basename(GNSS_SITE_LIST_URLS['SIDESHOW'])
if not os.path.exists(site_list_file):
dload_site_list(out_file=site_list_file, source=self.source, print_msg=True)

# find site in site list file
with open(site_list_file) as site_list:
Expand Down

0 comments on commit f5fc900

Please sign in to comment.