Skip to content

GEE Setup

Detailed guide for setting up Google Earth Engine.

Overview

Google Earth Engine (GEE) is a cloud-based platform for planetary-scale geospatial analysis. DeepGEE uses GEE to access and process satellite imagery.

Prerequisites

  • Google account
  • Internet connection
  • Web browser

Step-by-Step Setup

1. Sign Up for Google Earth Engine

  1. Visit https://earthengine.google.com/
  2. Click "Sign Up" or "Get Started"
  3. Sign in with your Google account
  4. Fill out the registration form:
  5. Select your use case (Research, Education, etc.)
  6. Provide your affiliation
  7. Describe your intended use
  8. Submit the form
  9. Wait for approval email (usually 24-48 hours)

Approval Time

GEE approval typically takes 1-2 days. You'll receive an email when approved.

2. Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Click "Select a project""New Project"
  3. Enter project details:
  4. Project name: e.g., "deepgee-project"
  5. Organization: (optional)
  6. Location: (optional)
  7. Click "Create"
  8. Note your Project ID (e.g., deepgee-project-123456)

3. Enable Earth Engine API

  1. In Google Cloud Console, go to APIs & ServicesLibrary
  2. Search for "Earth Engine API"
  3. Click on "Earth Engine API"
  4. Click "Enable"

4. Set Up Authentication

import deepgee

# This opens a browser for authentication
deepgee.authenticate_gee(auth_mode='notebook')

Method 2: gcloud Authentication

# Install gcloud CLI
# https://cloud.google.com/sdk/docs/install

# Authenticate
gcloud auth application-default login

# Set project
gcloud config set project your-project-id

Then in Python:

import deepgee
deepgee.initialize_gee(project='your-project-id', auth_mode='gcloud')

Method 3: Service Account

For automated workflows:

  1. Create a service account in Google Cloud Console
  2. Download the JSON key file
  3. Use in Python:
import deepgee
deepgee.initialize_gee(
    project='your-project-id',
    service_account='your-service-account@project.iam.gserviceaccount.com',
    key_file='path/to/key.json'
)

Verify Setup

Check that everything is working:

import deepgee

# Initialize
deepgee.initialize_gee(project='your-project-id')

# Check status
status = deepgee.auth.check_gee_status()
print(status)

# Expected output:
# {
#     'status': 'authenticated',
#     'project': 'your-project-id',
#     'user': 'your-email@gmail.com'
# }

Troubleshooting

Authentication Failed

# Re-authenticate
deepgee.authenticate_gee()

# Check credentials
import ee
print(ee.data.getAssetRoots())

Project Not Found

Make sure you're using the Project ID, not the project name.

Permission Denied

Ensure the Earth Engine API is enabled for your project.

Best Practices

Project Organization

Create separate projects for different applications to manage quotas and billing.

Service Accounts

Use service accounts for production deployments and automated workflows.

Quotas

Be aware of GEE usage quotas. Monitor your usage in the Google Cloud Console.

Next Steps