Hi everyone,

Until yesterday 11.05.2020 I used an old version of Open Foris Collect Earth. This version allowed me to work as I wanted i.e. GEE code editor worked very well and I had also managed to change the code for my study and so on.

Since yesterday, GEE code editor does not want to open anymore, and I get the following message in the internet window I get when clicking on a plot in Google Earth, and indicating my google account to acced to GEE code editor: "Couldn't sign you in This browser or app may not be secure. Learn more Try using a different browser. If you’re already using a supported browser, you can refresh your screen and try again to sign in." I tried everything I could, but did not find any solution. I can however connect to my google account without collect earth.

I downloaded the last version of Open Foris to check if this was cause of the issue, but it still does not work. I work on Windows.

I know that the option 2 in "integrated service" in the survey properties allows to navigate to GEE without having to connect to google acount which is already great! However, to be able to change the code in GEE code editor opens up unique prospects, and also the simple fact to be able to get the ID of the image displayed (the precise ID) is very useful, I used this for example to send the image to my QGIS 3.8.

Have you any news about this issue to share here ? is it possible to get the ID of the image from the non connected version of GEE ?

Thank you for your support, Justine

asked 12 May '20, 09:09

Justine's gravatar image

Justine
1112
accept rate: 0%

converted to question 12 May '20, 10:10

Open%20Foris's gravatar image

Open Foris ♦♦
9995714


Dear Justine,

Thank you for your question. Could you please share your current script to check if we could incorporate the functionality?

Otherwise you may use your own script into Collect Earth as a GEE App. Basically the process is as follows:

  1. Create your own GEE App that takes the plot as an argument
  2. Reference the GEE App from your survey, so that it is used when the user clicks on a plot instead of the default one.

Sounds easy, do not get excited yet :

Create a GEE App to be used by Collect Earth

You need to have a script that "receives" the plot polygon and uses it to generate the windows with the Sentinel and Landsat imagery and graphs.

The best would be for you to review the current code.

The code for the script used by default is one ( it uses the new ui.url.get method ) is here : https://code.earthengine.google.com/?scriptPath=users%2Fsanchezpauspro%2FApps%3ACollectEarthPlotAncillary

The GEE App results on this once the script is published (see how the polygon is passed as a parameter): https://collectearth.users.earthengine.app/view/plot#geoJson={%22type%22:%22MultiLineString%22,%22coordinates%22:[[[100.0,%200.0],[101.0,%201.0]],[[102.0,2.0],[103.0,3.0]]]}

Here is how to publish apps if you haven’t done it before: https://developers.google.com/earth-engine/apps

The main script refers to this other script that actually does most of the work (using the require construct ): https://code.earthengine.google.com/?scriptPath=users%2Fcollectearth%2Fce_scripts%3Aframes_landsat_v4

The scripts are contained in this public repository: https://code.earthengine.google.com/?accept_repo=users/collectearth/ce_scripts

Integrate this new GEE App into your Collect Earth survey

Once you have published your script as a GEE App, say the result is https://myuser.users.earthengine.app/view/myapp

Then you need to link it to your survey. As this is a "newish" feature we have not incorporated the parameter yet in the GUI so you need to edit the earth.properties file inside the Collect Earth folder: C:\Users\YOUR USERNAME\AppData\Roaming\CollectEarth ( remember AppData is a hidden folder so you need to activate the visualization of hidden folders in Windows SEE HOW TO VIEW HIDDEN FOLDERS)

Where it says :

gee_app_url=https\://collectearth.users.earthengine.app/view/plot

change it to your URL and save the file:

gee_app_url=https\://myuser.users.earthengine.app/view/myapp

So now after you start Collect Earth again this new GEE App will be used. We will add an easier way to configure this in the coming weeks.

Hope that the answer was not too difficult to follow. Let us know if you have more doubt. Remember to always share your scripts so that is it is easier to support you.

permanent link

answered 12 May '20, 11:47

collectearth's gravatar image

collectearth ♦
1.0k16
accept rate: 17%

edited 12 May '20, 11:59

Dear Collect Earth support team,

Thank you very much for your response, it is great to see how the support team is fast!

  • I will try the process you mentioned as soon as possible and I understand the principle.
  • My question was also to check with you if there is any news about connecting to the GEE code editor through the Collect Earth. As you said, I don't know why I have this problem since I've been using Collect Earth for weeks.
  • Regarding the modification of the Collect Earth scripts, it tooks me few hours to understand how the Collect Earth codes work in GEE (I have only very basic knowledge of coding) and I finally found that what I wanted was already written, but not "enabled", i.e. commented. So I used this code to display L7 and L8 plus S2 already displayed. Let me tell you that the combination of the NDVI graphics and the function to click on the graphic to display the images is very useful and instinctive. I wanted to have the same configuration for L7 and L8 (but it did not work well for L8: there was an issue with the dates).
  • This is great to see that what I wanted is available and working in the GEE APP you mentioned (without logging in to Google account).
  • What I think could be interesting to change in the code is the possibility to choose the cloud filter applied on the image collection for graphics to allow access to more images. If I'm not mistaken, there's a cloud filter applied on the displayed collections. I assume it comes from the metadata of the images, not calculated for each plot in the study. It might be a good idea to have a hand on it, because sometimes a very cloudy image can be the one you're looking for for a plot. I assume it can be done quite easily.

Now, the main "problem" I get is to retrieve the ID of the image displayed in GEE APP, as it is possible in the GEE code editor with "inspector" (e.g.: LANDSAT/LE07/C01/T1_SR/LE07_xxxxxx_xxxxxxxx). It is very important for me to have this ID, but I can't find out how to get it from GEE APP.

Thank you again for your reactivity. I wish you a nice day, Justine

permanent link

answered 12 May '20, 16:25

Justine's gravatar image

Justine
1112
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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:

×281

question asked: 12 May '20, 09:09

question was seen: 2,569 times

last updated: 12 May '20, 16:25