Skip to content

Azure #5

merged 2 commits into from Mar 8, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
cleaned up landsat analysis using VScode
jhicks committed Feb 28, 2022
commit a1d8b54bd06faa2f54be6613ffce3aac4a08bd32
15 changes: 7 additions & 8 deletions 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)