To use the extension, you can now use either Google Chrome or Firefox. To add it to Google Chrome, follow this link and simply add it to your Chrome. Refresh any open Google Earth Engine code editor page and it's ready to use! If you prefer to use Firefox, follow this link to add it to your browser. Simple enough?
The extension is provided with some basic setup. Set it up as you like in the options page. You can select the options you want to use or not. Some features require some extra setup (e.g., the Planet module).
For more information about each feature, check the feature documentation!
This functionality permits the overriding of some shortcuts within the code editor. If you're using a Mac, a selection has been pre-configured for your convenience (⌘+S, ⌘+Enter ...). Please feel free to modify these in the extension options page.
Set the shortcuts in the extension options and use them.
This feature was implemented by modifying the shortcut configurations in the code editor
A single button that starts all the tasks present in the task manager.
To use it, run a set of tasks and the button will appear. Simply press it and the tasks will start running.
The extension simulates a ctl/cmd+click on all tasks.
This extension introduces a dark theme.
To use it, simply select the mode you want with the logo in the upper right corner. For automatic mode based on your browser or system, double-click the logo or select the mode in the options page.
All Earth Engine tabs open in the same browser are linked. Changing the mode in one tab will change it in the others. Popups are designed for immediate interaction and therefore require your full attention. They have a white background to keep you alert 😆.
The dark mode was implemented by using a standard dark theme for the ACE code editor and by changing the color of the rest of the interface. A new "dark" class was added that makes some CSS modifications. The extension background manages communication between each open tab using a communication port and message exchange. This allows the mode to be synced and your preferences to be stored.
OEEL caching provides a 1-hour cache for files from the Open Earth Engine Library. This reduces the execution time when using the library and cannot be disabled.
If you use the OEEL library, you don't need to do anything as it will automatically use the cache.
This feature was implemented through a redirection of specific OEEL files. Requests are redirected to proxy-oeel-code.open-geocomputing.org
, which responds with the file and the appropriate cache header.
Manifest upload allows you to drag and drop one or more GeoTIFFs with their manifest and have it ingested directly.
To use this feature, begin by creating a manifest using the guidelines found here, with the key difference being the use of a local relative Unix-style file path instead of a gs:// address, ensuring it does not include ".." for parent directory navigation. Store the manifest.json
file in a designated folder, such as myUploadFolder
, with your GeoTIFFs (or zip for tables), which can be organized into subfolders. Drag and drop this folder onto the upload icon in the asset tab to initiate the upload, where you can monitor its progress in the task tab. If your data originates from URLs, it will be processed through your computer. For table uploads, incorporate table:true
into your manifest to indicate vector data. From version 1.8.0
onwards, uploads will be associated with the currently active cloud project.
The extension requests a GS upload link from Google, then the files are uploaded and the addresses in the manifest are replaced with the newly-obtained gs:// addresses. Finally, the manifest is submitted to GEE. For remotely available data (http(s)://), the data is first downloaded in the browser, temporarily stored, and uploaded following the same approach as for local files. The server must allow requests from https://code.earthengine.google.com
or else the browser protection will cancel the request.
This feature was extremely complex to keep stable and it was challenging to manage all the required scenarios for export. It is recommended to use the "Run All" task as the primary alternative.
This feature allows you to export an image, image collection, table, or video without having to press any buttons in the asset tab. However, to save our planet, always double-check that you really need to export a complete collection.
This is an in-built Open Earth Engine Library (OEEL) feature. Simply use the appropriate oeel.Export.ImageCollection.*
function. You can find an example here.
This was a challenging feature to implement! A communication was established between the running code and the extension through console printing. If the functionality is disabled or the extension is not installed, weird messages may appear in the console, but the code can still be executed. This communication instructs the extension on what to do.
It checks if assets are publicly available when sharing a script. This is only a check and does NOT change assets or repository permissions.
To use it, simply click "Get Link" or "Copy Script Path." If you choose "Copy Script Path," it will also check if the repository is public to allow another user to view the content.
The script and environment header are statically checked to detect all used assets, and the list of these assets is sent to an external service that checks their public availability.
Limitation: Assets with dynamically-created names cannot be checked.
This feature allows you to add a function signature from the documentation to the code script with a single click.
To use it, go to the documentation tab, search for the function that interests you, and click on the arrow. The function will be imported with the dictionary styling. Optional arguments are commented, and the default value is added as the default value 😄.
This function requests two files from Earth Engine that contain the function signature. Upon clicking, the signature is generated and imported into the editor.
This feature allows you to open a selected script in a separate browser tab.
To use it, simply double-click on the script.
This feature intercepts clicks on a script. If a second click is close enough in time, it will open the script in a separate tab. Otherwise, it will emulate the default behavior.
This feature allows you to use Plotly figures directly in the code editor as a widget, in the console or in the map. If you plan to use this feature in a deployed EEApp, keep in mind that your users will need to use the extension, or you will need to make a custom deployment and self-host your app.
The easiest way is to use the Open Earth Engine Library interface.
This interface allows for interactivity between the plot and Earth Engine as well.
Any Plotly figure can be used, even 3D graphs, but it requires some extra work.
Some examples:
When a plot is needed, an input box (ui.Textbox()
) with specific properties is created and detected by the extension, which then hides it and adds the expected Plotly plot. The input box is used to communicate between the plot and the EE code.
This feature allows you to customize the font used in the code editor.
Go to the extension options page and set the font according to your preference. Then reload the code editor page.
The default settings are simply overwritten based on your choice.
This feature allows you to directly copy a computed JSON from the console
Simply double click on the JSON display button in the console.
This feature adds an event listener to the JSON display button and subsequently copies the displayed JSON data to the clipboard.
This feature allows you to add a small link button to open the external documentation with examples.
Click on the button.
Have you ever found yourself losing precious time troubleshooting in the "Inspector" mode because the console's error messages weren't visible? This issue is now resolved! This feature enhances user experience by changing the color of the console button in the header to red whenever an error is fired. Thus, even when you're using the Inspector, you're promptly alerted to errors, preventing unnecessary delays in debugging.
Nothing just to keep activated in the options.
Every message displayed in the console is analyzed to determine if it's an error, and if necessary, the header color is adjusted accordingly.
This feature allows to use and import Python code.
You can use Python, simply start a file with a #
.
You can run a Python code using oeel.Python.run(sourceCode[,{variableDictionary}[,extraPackageList]])
You can import a Python script using oeel.Python.require(path[,extraPackageList])
in much the same way you would with the standard require(path)
. Any function declared in the Python file can be accessed. Each call to oeel.Python.require
and each run exists within its own separate Python pseudo-environment, ensuring that any coding errors or exceptions do not propagate. Nonetheless, cross-communication between these isolated environments is not possible.
It's worth noting that there's no need to import ee
or oeel
.
oeel.Python.require
.
oeel.Python.run
.
#
.
pks
parameter from JavaScript, or request it with a special comment like # requirements: firstPackage, secondPackage
or the shorter version # req: thirdPackage
. These comments can be placed anywhere in the code. ⚠️ Packages are cached between runs, but if a package needs to be installed, the code execution will restart after installation.
users/userName/repoName:filePath/inTheRepo
. They can be used with Python import using a dot separator, e.g., import users.userName.repoName.filePath.inTheRepo
. If you forget to import the package, a synchronous download will occur. (This is significantly slower.)
oeel.requireJS(path)
.
Export.*
functions are mapped directly to the code editor and thus, they cannot be a task cannot be invoked from Python. Consequently, functions like start()
or status()
cannot be called from Python.
ui.*
functions are not mapped to Python. In fact, the use of Python requires this specific extension. Therefore, employing Python for application development is not recommended.
Python script example
JS calling script
The current approach is a result of multiple trials and is possibly the best solution identified so far. It utilizes Pyodide, a Python interpreter compiled in WebAssembly for browser usage.
A modified version of the earthengine-api
package, which doesn't require initialization, enables all Earth Engine operations. In addition, functions like print()
, Map.*
, Export.*
, and the JavaScript version of require()
(which can be accessed as oeel.requireJS()
) along with some more exotic ee.data.*
functions, are forwarded to the Code Editor.
This feature allows you to search, order, and transfer PlanetLab imagery directly from GEE.
To use it, activate the feature in the extension options page, set up your account (if you log in, the API key will be retrieved automatically for you), set the path to your Planet imagery collection (this is required to remove already-available assets from the results list), and select the API version you want to use.
Once you've finished setting up, start with a single image to make sure everything works as expected before moving on to more downloads.
A very long story for a day when I am motivated.
The Open Earth Engine Extension (OEEex) is part of the open geocomputing initiative. Its goal is to provide Google Earth Engine (GEE) users with free and open extensions that offer missing features. Some of the code required many hours of design and debugging.
The project originates from an extension developed by Mathieu Gravey during his PhD for use by the Institute of Earth Surface Dynamics at the University of Lausanne. It started as a way to search for and automatically transfer Planet images to Google Earth Engine and became the platform for many small added features. After the Geo for Good 2021 event, it became clear that the extension should be shared with the community. The extension was redesigned and improved during the time at Utrecht University. Now it's maintained by the Digital Landscape group at the Institute For Interdisciplinary Mountain Research from the Austrian Academy Of Sciences in Innsbruck. Special thanks to Dr. Raphaël Nussbaumer, who was responsible for designing this website, and Pauline Ahumada for the animated logo.
No sensitive data is transmitted to any external service. The only sensitive information stored is your Planet API key, which is stored locally in your browser and is only used for requests to the Planet API. Your login and password are not stored, only the key.