From a1d8b54bd06faa2f54be6613ffce3aac4a08bd32 Mon Sep 17 00:00:00 2001 From: John Hicks Date: Mon, 28 Feb 2022 15:50:17 -0500 Subject: [PATCH] cleaned up landsat analysis using VScode --- azure-landsat/landsat-hls-azure.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/azure-landsat/landsat-hls-azure.py b/azure-landsat/landsat-hls-azure.py index 3322ce4..70022ac 100755 --- a/azure-landsat/landsat-hls-azure.py +++ b/azure-landsat/landsat-hls-azure.py @@ -1,6 +1,4 @@ #!/usr/bin/env python3 -# need to install - pip install azure-storage-blob -# https://nbviewer.org/github/microsoft/AIforEarthDataSets/blob/main/data/hls.ipynb # Environment setup import requests @@ -75,8 +73,8 @@ def lat_lon_to_hls_tile_id(lat,lon): # Build a tile path from components, including lat/lon lookup # Near Bear Lake, UT -# lat = 41.89655047211277; lon = -111.4132464403312 -lat = 39.768402; lon = -86.158066 +lat = 41.89655047211277; lon = -111.4132464403312 +# lat = 39.768402; lon = -86.158066 tile_id = lat_lon_to_hls_tile_id(lat,lon) print('Using Tile ID {}'.format(tile_id)) @@ -120,8 +118,8 @@ def lat_lon_to_hls_tile_id(lat,lon): dpi = 100; fig = plt.figure(frameon=False,figsize=(w/dpi,h/dpi),dpi=dpi) ax = plt.Axes(fig,[0., 0., 1., 1.]); ax.set_axis_off(); fig.add_axes(ax) -plt.imshow(rgb); -plt.imsave('test.png', rgb) +# plt.imshow(rgb); +# plt.imsave('test.png', rgb) i_daynum = int(daynum) product = 'L30' @@ -165,5 +163,6 @@ def lat_lon_to_hls_tile_id(lat,lon): dpi = 100; fig = plt.figure(frameon=False,figsize=(w/dpi,h/dpi),dpi=dpi) ax = plt.Axes(fig,[0., 0., 1., 1.]); ax.set_axis_off(); fig.add_axes(ax) -plt.imshow(rgb); -plt.show() +# plt.imshow(rgb); +# plt.show() +plt.imsave('test.png', rgb)