Skip to content

Instantly share code, notes, and snippets.

@giswqs
Last active February 7, 2024 16:48
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save giswqs/bab47213f0cbd3d1073ea47b01331c62 to your computer and use it in GitHub Desktop.
Save giswqs/bab47213f0cbd3d1073ea47b01331c62 to your computer and use it in GitHub Desktop.
Pucallpa, Peru
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yumyumkhan
Copy link

Dear Dr. Wu,

I am attempting to run this code for Fort Collins, CO using jupyter notebook but I am getting an error that I am unable to interpret due to my lack of knowledge in coding. I am sharing my error and my code with you to see if you have any possible solutions to offer.

Error:

Generating URL...
Downloading GIF image from https://earthengine.googleapis.com/v1alpha/projects/earthengine-legacy/videoThumbnails/333ebeb5236786e37da3cc7b61811603-fa27f18d4c3fcf18bb7a4a618537a06b:getPixels
Please wait ...
An error occurred while downloading.
User memory limit exceeded.
Generating URL...
Downloading GIF image from https://earthengine.googleapis.com/v1alpha/projects/earthengine-legacy/videoThumbnails/7d7a1e73d3f548d42ea66ea2b112aeb9-afabf5022b51650f093518be3101135d:getPixels
Please wait ...
An error occurred while downloading.
User memory limit exceeded.
The input gif file does not exist.
The input gif file does not exist.
The input gif file does not exist.
The input gif file does not exist.
Adding GIF to the map ...
The provided file does not exist.
The provided file does not exist.
The timelapse has been added to the map.

Code:
import ee
import geemap
Map =geemap.Map()
Map
Map.setCenter( -105.347512, 40.546957, 8)
Map.add_landsat_ts_gif(label= 'Fort Collins, CO', bands=['SWIR1', 'NIR', 'Red'], nd_bands=['NIR', 'Red'], nd_palette=['black', 'green'], nd_threshold=0.3, start_year=2000, start_date='01-01', end_date='12-31', frames_per_second=5)

Thank you!

@Selenachav
Copy link

Selenachav commented Feb 7, 2024

I am trying to run the code to get a time series for the Everglades and though I have changed my Map center and created a rectangle around the box, when I run the last line of code I keep getting the map from Peru. How do I fix this? Also how do you calculate NDWI in code instead of NDVI. Below is my current code.
Map.setCenter(25.4931887, -81.1582436, 9)
Map.add_landsat_ts_gif(label= 'Everglades', bands=['SWIR1', 'NIR', 'Red'], nd_bands=['NIR', 'SWIR1'], nd_palette=['brown', 'green'], nd_threshold=0.3, start_year=2013, end_year=2023, start_date='03-01', end_date='03-30', frames_per_second=2)

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