Google Earth Engine False Color Composites not showing correct location

  • Asked
  • Active
  • Viewed 6501 times
0

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.

1

Accepted answer

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!

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?

EarthOrbGIS EarthOrbGIS
1

Accepted answer

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.

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!

EarthOrbGIS EarthOrbGIS
0

Accepted answer

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

https://code.earthengine.google.com/?accept_repo=users/collectearth/ce_scripts

alt text

Your answer

Markdown text. Shortcuts: Ctrl+B bold, Ctrl+I italic, Ctrl+K link, Ctrl+E code, Ctrl+Shift+V paste as plain text. Tab indents list items and code; press Escape, then Tab, to leave the text box.

Insert an image

Say what the image shows, for people who can't see it.

Tip: type a few words from the error message, or put a tag in [brackets] to look only there.

Menu

Keyboard shortcuts

Anywhere

?
Show this list
/
Search
g h
Go to the home page
g q
Go to the questions
g t
Go to the tags
g u
Go to the users
a
Ask a question

Lists of questions

j k
Next or previous question
Enter
Open the question

Question pages

j k
Next or previous post

Shortcuts never apply while you type in a text field. Members can turn them off in their preferences.