From ab949994617ef7fa1b3bcd8fc6553a63891e6ca7 Mon Sep 17 00:00:00 2001 From: Zhang Yunjun Date: Sun, 6 Sep 2020 17:01:43 -0700 Subject: [PATCH] bugfix for view.py --coastline option (#440) * bugfix for view.py --coastline option --- mintpy/view.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mintpy/view.py b/mintpy/view.py index 58cc8d368..f5d60577b 100755 --- a/mintpy/view.py +++ b/mintpy/view.py @@ -300,11 +300,17 @@ def update_inps_with_file_metadata(inps, metadata): print_msg=inps.print_msg) # Map info - coordinate unit and map projection + # Use cartopy GeoAxes instance if input data is: + # 1. geocoded in the unit of degrees AND + # 2. displayed in geo-coordinates + # to support: + # 1. fancy lat/lon label + # 2. coastline inps.coord_unit = metadata.get('Y_UNIT', 'degrees').lower() if (inps.geo_box and inps.fig_coord == 'geo' and inps.coord_unit.startswith('deg') - and inps.lalo_label): + and (inps.lalo_label or inps.coastline)): inps.proj_obj = eval('ccrs.{}()'.format(inps.map_projection)) else: inps.proj_obj = None