Skip to content

Commit

Permalink
cleaned up landsat analysis using VScode
Browse files Browse the repository at this point in the history
  • Loading branch information
jhicks committed Feb 28, 2022
1 parent 1d1f5cd commit a1d8b54
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions azure-landsat/landsat-hls-azure.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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)

0 comments on commit a1d8b54

Please sign in to comment.