Skip to content

Instantly share code, notes, and snippets.

@girija2204
Last active September 1, 2020 04:29
Show Gist options
  • Save girija2204/c703222790e95d8df5ef45328f0a12c1 to your computer and use it in GitHub Desktop.
Save girija2204/c703222790e95d8df5ef45328f0a12c1 to your computer and use it in GitHub Desktop.
Showing satellite images within 6 hours
map = gis.map()
map.add_layer(landsat_data) # printing the whole data on the map
# Selecting the imageries collected on a single day from 2020-08-01 00:00:00 to 2020-08-02 00:00:00
features = landsat_data.layers[0].query(time_filter=[datetime(2020,8,1,00,00,00),datetime(2020,8,2,00,00,00)], order_by_fields="AcquisitionDate")
features # <FeatureSet> 375 features, or imageries collected on a single day
features.sdf.head() # sdf converts it into a spatial data frame, prints first 5 rows of the dataframe
# printing the imageries on the map
map = gis.map()
map.add_layer(features)
@girija2204
Copy link
Author

girija2204 commented Aug 25, 2020

Landsat 8 orbits one rotation around earth in 99 minutes, in a sun-synchronous orbit, to capture imageries in day sunlight. It takes 16 days for the satellite to cover one full rotation and take a whole picture of the earth. The above code snippet shows the images captured within 6 hours, prints them as a dataframe, and shows them on the map.
image

@girija2204
Copy link
Author

Unlike above one, if we print the whole landsat data on the map, then it uses the data collected for all the 16 days and prints them on the map.
landsat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment