I use Collect Earth to assess landcover points in Southeast Asia. During my assessments, I use the Landsat and Sentinel False Color Composites (FCC) using the Google Earth Engine (GEE) app (no sign-in required). As I move from one sample point to the next, the GEE FCC panels would refresh to show the location of the sample being assessed in Google Earth.

The problem is that this does not work correctly each time. On some occasions, the GEE panels refresh fine. On others, they do not go to the location at all and instead show the North American continent. See this link to the image, I cant post an image yet because image uploads on this forum are limited to users with > 60 reputation points.

When this issue happens, I try to fix it by refreshing the browser. Sometimes, this works and the panels are reoriented over the sample location. Other times, it does not work and continues to show the North American continent. When refreshing a point through the browser (Chrome) does not work, I deliberately click the next sample point in Collect Earth to force a 'hard' refresh, and then go back to the previous point. This sometimes works and sometimes doesn't.

Has anyone else faced this problem? How do I fix it such that this does not happen again? From my simplistic understanding of GEE, viewing imagery over a region of choice is simply via the use of Map.centerObject() in the GEE widgets for this app. So, I am not sure why it is malfunctioning.

asked 05 Jan, 03:17

EarthOrbGIS's gravatar image

accept rate: 0%

The bug should be fixed now ( more like a workaround really) There is a 7 seconds timeout function that forces the plot to be centered...it does not fix the underlying issue but It does work!

permanent link

answered 07 Jan, 16:49

collectearth's gravatar image

collectearth ♦
accept rate: 17%

Amazing! It works very well now, as you mentioned, if it shows the continental US in the panels, after about 7 seconds, the panels will then center to the plot! Very nice thank you!

Curious, how did you set the 7 seconds timeout function?

(09 Jan, 03:35) EarthOrbGIS EarthOrbGIS's gravatar image

Thank you for reporting the issue!

We are working on it, it seems that sometimes the Map.centerObject() is being ignored ( or perhaps it is called before the rest of the map is built).

This issue should be fixed today, will post an update here.

permanent link

answered 05 Jan, 12:30

collectearth's gravatar image

collectearth ♦
accept rate: 17%

Thank you for responding so promptly. I am glad to hear that this is a recognized problem and that there are efforts to fix it. Thanks!

(06 Jan, 04:06) EarthOrbGIS EarthOrbGIS's gravatar image

The timeout is set at the end of the second script used by the GEE App:

it uses : ui.util.setTimeout(func, delay) function from the GEE Code Editor API

This is however bad programming from my side, as I should find where is the asynchronous method in the script that causes this random behavior (though it should all be synchronous...), sadly after spending a few hours trying to figure it out I gave up and used this kind of brute-force approach, however I will try to fix the root issue in a few weeks.

If you are curious about the GEE App used by Collect Earth do take a look at these scripts (which are the ones used by the app):

Script called from the GEE App that takes the URL parameters and sends them to the "main" script: https://code.earthengine.google.com/?scriptPath=users%2Fsanchezpauspro%2FApps%3ACollectEarthPlotAncillary

The main script mounting the UI : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Aframes_landsat_v4

The auxiliary scripts used by the "main" one :

Charts : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2Fcharts_v2

Landsat imagery : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2FSentinelLandsatImagery

Sentinel imagery : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2Fsentinel2

UI helper methods : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2Fui

More helper methods for imagery : https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Acommon%2Futils

Many examples here with the full repository


alt text

permanent link

answered 09 Jan, 10:52

collectearth's gravatar image

collectearth ♦
accept rate: 17%

edited 09 Jan, 10:54

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 05 Jan, 03:17

question was seen: 76 times

last updated: 09 Jan, 10:54