Skip to content

Commit

Permalink
save_kmz: support data in UTM (#1210)
Browse files Browse the repository at this point in the history
* convert UTM coords to WGS84 in write_kmz_overlay

* check for UTM_ZONE in metadata before converting bbox coords to wgs84

* undo extensive formatting

* empty line at end of file

* fix end of file
  • Loading branch information
Alex-Lewandowski authored Jun 6, 2024
1 parent 4218fbf commit 44d5afd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mintpy/save_kmz.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ def write_kmz_overlay(data, meta, out_file, inps):
"""

south, north, west, east = ut.four_corners(meta)
# convert from UTM to WGS84 when necessary, as KML only natively supports WGS84
if "UTM_ZONE" in meta.keys():
north, east = ut.utm2latlon(meta, east, north)
south, west = ut.utm2latlon(meta, west, south)

# 1. Make PNG file - Data
print('plotting data ...')
Expand Down

0 comments on commit 44d5afd

Please sign in to comment.