A Practical Guide to Integrating Google Cloud projects and GEE for Universities

Written by Dr. Samapriya Roy for the SpaceHACK for Sustainability Hackathon, 2023.

Also published here: https://samapriyaroy.medium.com/google-cloud-projects-and-earth-engine-integration-in-universities-a-practical-guide-fb16d8dad14a

With Google Earth Engine, you can now invite other users with varying levels of access and permissions, as well as keep project environments separate. These updates make using Google Projects with Earth Engine more powerful and user-friendly.

Step 1. Creating a Google Cloud Project on your Personal account

This is a relatively easy process. It requires you to log into the GCS console click on the projects dropdown and click on “New Project”. The project is created in a few seconds:

Creating your Google Cloud Project

Step 2. Enabling Google Earth Engine API on your Personal account

To ensure that your newly created Google Cloud Project is compatible with GEE, you’ll need to enable the Earth Engine API. To do this, navigate to the API and Services section in your Google Cloud account and click on “Enabled API & Services.” From there, click on “Enable API” and search for “Earth Engine.” Once you’ve located it, enable the API. Keep in mind that it may take a few minutes for the changes to propagate. In this example, I am performing these steps on my personal account, as I have full control over the policies here.

Enabling Earth Engine API

Step 3. Assigning Earth Engine Roles to Personal Cloud Projects

Earth Engine comes with several preconfigured roles and permissions, which can be found on the Earth Engine roles definition page. Although you can configure fine-grained permissions, the Earth Engine resource writer role should be sufficient for sharing the project with your university account. Keep in mind, however, that permissions may take a few minutes to propagate, so be sure to wait before attempting to add the shared Google Cloud project to your university Earth Engine account.

Adding the right Google Earth Engine role

4. Adding Personal Google Cloud Project to University GEE account

Once you have set up the roles, simply add the cloud project you created with the proper APIs enabled and roles defined to your university GEE account.

Adding personal Google Cloud project to university GEE account

This should be it; it will now grant you access to the folder for collecting your assets. In the next section, we see how asset-level and project-level configurations differ and how they can be configured properly if needed.

Optional Step: Configuring Asset and Project-Level Permissions for Your Personal Account

While it is possible to use your Google Earth Engine account without a Cloud project, doing so may limit your access to certain features and resources. For example, the Earth Engine resource writer role should be sufficient for basic usage; however, if you decide to use a Cloud project with your Earth Engine account or use GEE in notebook settings or while calling the REST API using the python library. You may need to grant additional permissions, such as the Service Usage Consumer role.

This is not typically required for university account setups and while using the code editor. But it’s something to keep in mind if you’re planning on migrating your computation and linking it to an individual project.

Setting Service Usage Consumer

If you are adding the extra role and would like to migrate your computation to a cloud project, you can now choose the project again in the user dropdown

Adding personal project to your university GEE account

Wrap-Up and Key Takeaways

By linking a Google Cloud Project from your personal account to your university Google Earth Engine account, you can now easily share project spaces and resources with multiple users. One handy tip is to share the entire Google project and make the other account a co-owner, giving you full permission to manage roles and definitions from either account. This does send an email to the co-owner and you must accept the Google project. But that trick and exploring its benefit are for a different day.