Skip to content

[FR]: Add documentation on using XEE with Dask #345

Description

@spatialthoughts

Feature Summary

Using XEE with a Dask distributed cluster requires setting up authentication for each Dask worker. I am able to use a setup like the following to make this work.

from dask.distributed import Client
from dask.distributed import WorkerPlugin

client = Client()  

class EEPlugin(WorkerPlugin):
    def __init__(self):
        pass
    def setup(self, worker):
        self.worker = worker
        try:
            ee.Initialize(project=cloud_project)
        except:
            ee.Authenticate()
            ee.Initialize(project=cloud_project)

ee_plugin = EEPlugin()
client.register_plugin(ee_plugin)

Here's a compelte example.

Use Cases

Dask allows users to use their own machien or cluster for distributed computing. This is useful in cases where you need to use scientific Python packages instead of GEE API. Here's an example Calculating SPI

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageA new issue that needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions